Customizing SMF > SMF Coding Discussion

Creating a bot

(1/1)

Yoshi:
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.

Arantor:
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.

Yoshi:

--- 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.
--- End quote ---
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.

--- End quote ---
Yeah, that's true. I guess I'll keep it to a guest :)

Arantor:
I wouldn't necessarily call it a bot, because it's not running autonomously ;)

Yoshi:

--- 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 ;)

--- End quote ---
Yeah that's right, though I can't really find any other name for it :P

Navigation

[0] Message Index

Go to full version