Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: NanoSector on July 03, 2012, 03:26:14 PM

Title: Creating a bot
Post by: NanoSector on July 03, 2012, 03:26:14 PM
Hi!

For my FXTracker project, I need to create a bot, to post topics. I know I can do it with the user's account, but I'd prefer having a bot, so the entries do not get deleted once the users' account gets deleted.

So, how can I create a bot, with which you cannot log into it, but still allows all the functions of lessay an administrator?

SMF 2.0.2, with FXTracker Alpha.
Title: Re: Creating a bot
Post by: Arantor on July 03, 2012, 03:47:09 PM
You can use createPost() without having an account ;) You just pass user id 0 to $posterOptions, whatever name you like in the name element.

The one thing is that it looks like a guest - but that's honestly the best you can do without creating a new account - and a new account can always be logged into, or have other undesirable behaviour attached.
Title: Re: Creating a bot
Post by: NanoSector on July 03, 2012, 03:50:15 PM
Quote from: Arantor on July 03, 2012, 03:47:09 PM
You can use createPost() without having an account ;) You just pass user id 0 to $posterOptions, whatever name you like in the name element.
Ah, thanks, that will also do exactly what I want! I just like a simple bot to perform operations like posting topics and creating new content.

Quote
The one thing is that it looks like a guest - but that's honestly the best you can do without creating a new account - and a new account can always be logged into, or have other undesirable behaviour attached.
Yeah, that's true. I guess I'll keep it to a guest :)
Title: Re: Creating a bot
Post by: Arantor on July 03, 2012, 03:52:07 PM
I wouldn't necessarily call it a bot, because it's not running autonomously ;)
Title: Re: Creating a bot
Post by: NanoSector on July 03, 2012, 03:55:55 PM
Quote from: Arantor on July 03, 2012, 03:52:07 PM
I wouldn't necessarily call it a bot, because it's not running autonomously ;)
Yeah that's right, though I can't really find any other name for it :P