X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fmodules%2FDummyServ.mod%2Fbot_DummyServ.c;h=2911b23f7e399f55cb4507dc340ecef1604a2376;hb=4929b3cfa489f3fc5868bf768479f30fff18a272;hp=51d8bfb0e153f805e26a1b25209465a871f4d5ff;hpb=8a990d2c87f8f8a6ca26dd2c6afef161dab2eb9e;p=NeonServV5.git diff --git a/src/modules/DummyServ.mod/bot_DummyServ.c b/src/modules/DummyServ.mod/bot_DummyServ.c index 51d8bfb..2911b23 100644 --- a/src/modules/DummyServ.mod/bot_DummyServ.c +++ b/src/modules/DummyServ.mod/bot_DummyServ.c @@ -1,4 +1,4 @@ -/* bot_DummyServ.c - NeonServ v5.3 +/* bot_DummyServ.c - NeonServ v5.4 * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -15,6 +15,7 @@ * along with this program. If not, see . */ #include "../module.h" +#include "../botid.h" #include "bot_DummyServ.h" #include "../../modcmd.h" @@ -37,16 +38,19 @@ #include "../../EventLogger.h" #include "../../bots.h" -#define BOTID 3 +#define BOTID DUMMYSERV_BOTID #define BOTALIAS "DummyServ" 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]); }