this is a very simple bot......type `commands to see wut it can do when you have it set up.to set the bot up, set this code in the remotes section, then go into the variables and type %owner.yournickhere , this makes you the owner of the bot, meaning you can control it.
on *:TEXT:`say *:?: { if (%owner. $+ $nick) { say $2- } }
on *:TEXT:`join *:?: { if (%owner. $+ $nick) { join $2- } }
on *:TEXT:`addop *:#: { if (%owner. $+ $nick) { set %op. $+ $nick } }
on *:TEXT:`addh *:#: { if (%owner. $+ $nick) { set %h. $+ $nick } }
on *:TEXT:`addv *:#: { if (%owner. $+ $nick) { set %v. $+ $nick } }
on *:TEXT:`delop *:#: { if (%owner. $+ $nick) { unset %op. $+ $nick } }
on *:TEXT:`delh *:#: { if (%owner. $+ $nick) { unset %h. $+ $nick } }
on *:TEXT:`delv *:#: { if (%owner. $+ $nick) { unset %v. $+ $nick } }
on *:TEXT:`op *:#: { if (%owner. $+ $nick) { mode # +o $2- } }
on *:TEXT:`halfop *#: { if (%op. $+ $nick) { mode # +h $2- } }
on *:TEXT:`voice *:#: { if (%op. $+ $nick) { mode # +v $2- } }
on *:TEXT:`kick*:#: { if (%owner. $+ $nick) { kick # $2- } }
on *:TEXT:`kickban*:#: { if (%op. $+ $nick) { mode # +b $2- { kick # $2- } } }
on *:TEXT:hello *:#: { if ($me == $2-) { say $chan well hello there } }
on *:JOIN:#: { notice $nick Welcome, {(@)} $nick {(@)} }
on *:TEXT:`commands*:#: {
if (%op. $+ $nick) {
notice $nick to make the bot say something pm it and use `say <???>
notice $nick to kick someone, use `kick <nick>
notice $nick to kick/ban someone, use `kickban <nick>
notice $nick to make the bot join a channel, use `join <chan>
notice $nick to add an op, use `addop <nick>
notice $nick to add halfop, use `addh <nick>
notice $nick to add voice use `addv <nick>
notice $nick to delete an op, use `delop <nick>
notice $nick to delete a halfop, use `delh <nick>
notice $nick to delete a voiced, use `delv <nick>
}
I wouldn\'t think of this as a bot at all. If anything i would have named this Bot Commands + Auto Responder on text or something of the sort. A bot to me has alot more to it. Even though you mentioned it was simple. Most people wont put this in a mirc file and load it up in there channel just for some simple commands that can easily be used by your self. But thats just my opinion.
Well... apart from the fact that you\'re missing a closing } at the end of it... most commands won\'t work if your nick isn\'t set up as a bot admin, but you give no indication of HOW to set up your nick as a bot admin. Even just to use the commands command you need to have your nick set up as an op... and again, you give no indication of how to set up your nick as an op (except an admin command which is inaccessible if you don\'t know how to set up your nick as an admin). Some of the commands listed in
commands are admin-only (most of them, in fact), which defeats the point of giving ops a command listing (which doesn\'t specify which commands are admin-only); admin nicks can\'t get a command listing (it\'s op-only). Some commands are not listed (op,
halfop, voice); adding or removing somebody as an op/halfop/voice does nothing (there\'s no on join event to automatically op/halfop/voice them).
say will only let you say one word (it should be $$2- rather than $$2, also you only need $2- because since it triggers on \"say *\" it\'ll not trigger if somebody simply says \"
say\", it\'ll want a space and something after that to trigger). You have an extra $+ in the kickban line. There\'s still the inherent insecurity of granting bot control by nick that Cypher87 mentioned, plus using a variable for each nick to store who is what you\'ll have the variables section full of variables after a bit... I\'d suggest either using a single variable (ie. %admins holding all admin nicks) and tokens, or access levels (which would be safer as well if you match it by ident@host rather than by nick). And finally, as I\'ve already mentioned, I dislike the use of
as a command prefix, because people with non-English keyboards will NOT be able to type it directly, they\'ll need to copypaste or do keyboard-acrobatics (I forget the alt+numbers combination, I copypasted it)... you really should use the more common ! or . as a command prefix, there\'s a reason they\'re widely used :)