#include "module.h" #define AUTHOR "Keeper" #define VERSION "1.0" int ms_send_cowners(User * u); extern NickCore *nclists[1024]; extern void memo_send(User * u, char *name, char *text, int z); void AnopeInit(void) { Command *c; c = createCommand("sendowners", ms_send_cowners, is_services_admin, -1, -1, -1, -1, -1); alog("ms_cowner.so: Add Command 'sendowners' Status: %d", moduleAddCommand(MEMOSERV, c, MOD_HEAD)); moduleAddAuthor(AUTHOR); moduleAddVersion(VERSION); } int ms_send_cowners(User * u) { NickCore *nc; int i, count = 0; char *text = strtok(NULL, ""); for (i = 0; i <= 1024; i++) { for (nc = nclists[i]; nc; nc = nc->next) { if (nc->channelcount > 0) { memo_send(u, nc->display, text, 1); count++; } } } notice(s_MemoServ, u->nick, "Memo to all channelfounders sent. [%d]", count); return MOD_STOP; }