BeBot - An Anarchy Online and Age Of Conan chat automaton
General => Feedback and Suggestions => Topic started by: Solerna on November 11, 2005, 03:40:30 am
-
Had the plan to run a public raidbot and has found most funcitons I wanted availible. However there is a little thing that I have yet to find. And that is a ban function. Is there any way to keep someone out of bot when when runing a public raidbot that does not require membership. Or will I have to try and write something?
Last resort would be to require ppl to be members of the bot, but that is not something I want.
-
I don't have anything written for BeBot specifically, but with think this (http://cvs.sourceforge.net/viewcvs.py/ringbot/RINGBot/modules/PrivGroup.php?rev=1.2&view=markup) module I've written for RINGBot should work pretty nice. The !ban and !unban command needs a hack in main.php to work though. main.php should be in the repository too if you want to see how it's implemented, just have a search for "is_banned". !setlimit sets the maximum number of players allowed in the bot...I'm not 100% what you are looking for, just hope this is helpful ;)
edit: I see that it won't work out-of-the-box at all now...I have a function that gets all members online in Bot.php which is needed. Anyway, minor modifications should make it work
-
This (http://www.m8y.de/ao/bebot/PrivGroup.phps) is the module I use for chat invites, it includes a banlist.
In addition to this I have added the is_banned function to Bot.php, and added a if(is_banned($name) return false; at the beginning of is_members().
I haven't removed the use of my get_tablename and get_setting functions.
You can use the following code to solve that though (add in Bot.php):
/*
Returns a selected setting:
*/
function get_setting($set)
{
$res = $this -> db -> select("SELECT * FROM settings"
. " WHERE setting = '" . $set . "'");
if (!empty($res))
return $res[0][1];
else
return "";
}
function get_tablename($table)
{
return $table;
}
-
Thanks =) Got it up and running.