EpicNet.Ru - Форум IRC Чата

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.



Bot commands for databases

Сообщений 1 страница 2 из 2

1

Hello Epic,

I have seen a code which would take input from some of the authorized nicks from its database and do as that nick says. lets say, nick Pinocchio is a bot and has different databases in it which it uses to protect the channel just like how baduser.txt helps us. now, lets say, if a nick 'tanya' wants to add or delete any entry saved in that database file then she could just trigger below given commands :-

Baduser.txt database

To add: !addBL nick;host;reason
To del: !delBL nick;host
To Search: !search nick;host or just nick

Badnick.txt database

To add: !bwADD *badword*;length;reason
To del: !bwDEL *badword*
To Search: !searchBW *badword*

Exception.txt database

To add: !beADD *nick*;length;reason
To del: !beDEL *nick*
To Search: !searchBE nick

Whitelist.txt database

To add: !wADD nick;reason
To del: !wDEL nick
To Search: !searchW nick

any additional commands like kick, ban, kick/ban, set mode, would be awesome. also as per my understanding we can make an entire new code for this as we would just need the database files (baduser.txt, badword.txt, exception.txt and whitelist.txt) files to add, remove and modify the entries in it. although, would like to have your suggestions on it and also from any other reader who wish to comment on this.

ps. Chose to create a new post for this as it has different databases from different codes.

Thanks & Regards,

Sleepyhead

2

1316,362 написал(а):

I have seen a code which would take input from some of the authorized nicks from its database and do as that nick says. lets say, nick Pinocchio is a bot and has different databases in it which it uses to protect the channel just like how baduser.txt helps us. now, lets say, if a nick 'tanya' wants to add or delete any entry saved in that database file then she could just trigger below given commands. Any additional commands like kick, ban, kick/ban, set mode, would be awesome.

Для этого нет необходимости создавать новый скрипт. Все дополнительные команды для внешнего управления можно создать внутри самих скриптов, которые в этом нуждаются.

Это делается на основе обработчика событий "on TEXT", который принимает и обрабатывает текст в указанном окне. Подробнее: https://en.wikichip.org/wiki/mirc/on_events/on_text

О том, как это сделать также обсуждалось в другой теме: http://forum.epicnet.ru/viewtopic.php?id=940

Подпись автора

[html]<style>img {vertical-align:middle;}.hnet{color:#FFFFFF;}.hstar{color:#DE0000;}.htext{font-family:Verdana;font-size:13px;color:#6E1E00;}.heading{font-family:Verdana;font-size:13px;font-weight:bold;background-color:#4897E7;}.stitle{font-family:Verdana;font-size:12px;}.dot{color:#808000;}.desc{color:#ADADAD;}a .curl{font-family:Verdana;font-size:13px;color:#3A92CD;}</style><table><tr><td width="20px" height="20px"><img src="http://forumstatic.ru/files/000d/c9/8c/34681.jpg"></td><td><a href="http://forum.epicnet.ru/viewtopic.php?id=234"><span class="heading"> <span class="hstar">★</span> <span class="hnet">EpicNet.Ru</span> <span class="hstar">★</span> </span><span class="htext"> - IRC Чат © 2008</span></a></td></tr><tr><td></td><td><div class="stitle"><span class="dot">•</span> <span class="desc">Вход через вебгейт:</span> <a href="http://irc.epicnet.ru"><span class="curl">http://irc.epicnet.ru</span></a><br><span class="dot">•</span> <span class="desc">Сервер:</span> irc.epicnet.ru <span class="desc">Порты:</span> 6667, 6668 (ssl)<br><div></td></tr></table>[/html]