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
/
DummyServ.mod
/
bot_DummyServ.c
diff --git
a/src/modules/DummyServ.mod/bot_DummyServ.c
b/src/modules/DummyServ.mod/bot_DummyServ.c
index 5eeff5a6fcf02b4fc220612147d3e8622f5cab7d..2911b23f7e399f55cb4507dc340ecef1604a2376 100644
(file)
--- a/
src/modules/DummyServ.mod/bot_DummyServ.c
+++ b/
src/modules/DummyServ.mod/bot_DummyServ.c
@@
-45,9
+45,12
@@
static void dummyserv_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]);
}