projects
/
NeonServV5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added OPER support (let the bots try to op themselves)
[NeonServV5.git]
/
src
/
modules
/
NeonServ.mod
/
bot_NeonServ.c
diff --git
a/src/modules/NeonServ.mod/bot_NeonServ.c
b/src/modules/NeonServ.mod/bot_NeonServ.c
index 6fa5236862437e0e059533ec0839721dc71cce97..8421fdbd840cadf7df7a039f4913bb0477cc4ad2 100644
(file)
--- a/
src/modules/NeonServ.mod/bot_NeonServ.c
+++ b/
src/modules/NeonServ.mod/bot_NeonServ.c
@@
-419,9
+419,12
@@
static void neonserv_bot_ready(struct ClientSocket *client) {
MYSQL_RES *res;
MYSQL_ROW row;
MYSQL_RES *res;
MYSQL_ROW row;
- printf_mysql_query("SELECT `automodes` FROM `bots` WHERE `id` = '%d'", client->clientid);
+ printf_mysql_query("SELECT `automodes`
, `oper_user`, `oper_pass`
FROM `bots` WHERE `id` = '%d'", client->clientid);
res = mysql_use();
if ((row = mysql_fetch_row(res)) != NULL) {
res = mysql_use();
if ((row = mysql_fetch_row(res)) != NULL) {
+ if(row[1] && row[2]) {
+ putsock(client, "OPER %s %s", row[1], row[2]);
+ }
putsock(client, "MODE %s +%s", client->user->nick, row[0]);
}
putsock(client, "MODE %s +%s", client->user->nick, row[0]);
}