X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2Fmodules%2FDummyServ.mod%2Fbot_DummyServ.c;h=2911b23f7e399f55cb4507dc340ecef1604a2376;hp=5eeff5a6fcf02b4fc220612147d3e8622f5cab7d;hb=4929b3cfa489f3fc5868bf768479f30fff18a272;hpb=2f821c1863d50646d3658a835c3675193b534f33 diff --git a/src/modules/DummyServ.mod/bot_DummyServ.c b/src/modules/DummyServ.mod/bot_DummyServ.c index 5eeff5a..2911b23 100644 --- 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; - 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) { + if(row[1] && row[2]) { + putsock(client, "OPER %s %s", row[1], row[2]); + } putsock(client, "MODE %s +%s", client->user->nick, row[0]); }