#include "config.h" #include "struct.h" #include "common.h" #include "sys.h" #include "numeric.h" #include "msg.h" #include "channel.h" #include #include #include #include #include #ifdef _WIN32 #include #endif #include #include "h.h" #include "proto.h" #ifdef STRIPBADWORDS #include "badwords.h" #endif #ifdef _WIN32 #include "version.h" #endif DLLFUNC int m_ircops(aClient *cptr, aClient *sptr, int parc, char *parv[]); #define MSG_IRCOPS "IRCOPS" #define TOK_IRCOPS "iz" ModuleHeader MOD_HEADER(ircops) = { "ircops", "http://www.crypthon.org/tmp/", "IRCop list", "3.2-b8-1", NULL }; DLLFUNC int MOD_INIT(ircops)(ModuleInfo *modinfo) { add_CommandX(MSG_IRCOPS, TOK_IRCOPS, m_ircops, MAXPARA, M_USER); MARK_AS_OFFICIAL_MODULE(modinfo); return MOD_SUCCESS; } DLLFUNC int MOD_LOAD(ircops)(int module_load) { return MOD_SUCCESS; } DLLFUNC int MOD_UNLOAD(ircops)(int module_unload) { if (del_Command(MSG_IRCOPS, TOK_IRCOPS, m_ircops) < 0) { sendto_realops("Failed to delete commands when unloading %s", MOD_HEADER(m_ircops).name); } return MOD_SUCCESS; } DLLFUNC int m_ircops(aClient *cptr, aClient *sptr, int parc, char *parv[]) { ConfigItem_oper *oper; int opers = 0; sendto_one(sptr, ":%s 001 %s :-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-", me.name, sptr->name); sendto_one(sptr, ":%s 001 %s : ", me.name, sptr->name); for (oper = conf_oper; oper; oper = (ConfigItem_oper *) oper->next) { if ((cptr = find_person(oper->name, NULL)) && IsARegNick(cptr)) { sendto_one(sptr, ":%s 001 %s :\2%s\2 [%s] \2ONLINE\2", me.name, sptr->name, oper->name, oper->swhois); opers++; } else { sendto_one(sptr, ":%s 001 %s :\2%s\2 [%s] \2OFFLINE\2", me.name, sptr->name, oper->name, oper->swhois); } } sendto_one(sptr, ":%s 001 %s : ", me.name, sptr->name); sendto_one(sptr, ":%s 001 %s :Toplam \2%d\2 yönetici aktif durumda.. ", me.name, sptr->name, opers); sendto_one(sptr, ":%s 001 %s :-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-", me.name, sptr->name); return 0; }