X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2Fmodules%2FNeonFun.mod%2Fbot_NeonFun.c;h=e5706ae8cc875f2d059f01a23a2e73817270fce9;hp=ebb0cc58dc4ac17d7d2cdffcb060d41b468a874f;hb=4929b3cfa489f3fc5868bf768479f30fff18a272;hpb=2f821c1863d50646d3658a835c3675193b534f33 diff --git a/src/modules/NeonFun.mod/bot_NeonFun.c b/src/modules/NeonFun.mod/bot_NeonFun.c index ebb0cc5..e5706ae 100644 --- a/src/modules/NeonFun.mod/bot_NeonFun.c +++ b/src/modules/NeonFun.mod/bot_NeonFun.c @@ -47,9 +47,12 @@ static void neonfun_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]); }