diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/cs_modes.c | 4 | ||||
-rw-r--r-- | src/modules/cs_appendtopic.c | 2 | ||||
-rw-r--r-- | src/modules/cs_enforce.c | 4 | ||||
-rw-r--r-- | src/modules/cs_tban.c | 2 | ||||
-rw-r--r-- | src/modules/hs_request.c | 10 | ||||
-rw-r--r-- | src/send.c | 29 | ||||
-rw-r--r-- | src/sessions.c | 4 | ||||
-rw-r--r-- | src/timeout.c | 12 |
8 files changed, 19 insertions, 48 deletions
diff --git a/src/core/cs_modes.c b/src/core/cs_modes.c index 0597f2f4f..feb82d108 100644 --- a/src/core/cs_modes.c +++ b/src/core/cs_modes.c @@ -341,7 +341,7 @@ int do_util(User * u, CSModeUtil * util) chan_set_modes(s_ChanServ, uc->chan, 2, av, 2); if (util->notice && ci->flags & util->notice) - notice(whosends(ci), uc->chan->name, + ircdproto->SendMessage(whosends(ci), uc->chan->name, "%s command used for %s by %s", util->name, u->nick, u->nick); } @@ -381,7 +381,7 @@ int do_util(User * u, CSModeUtil * util) chan_set_modes(s_ChanServ, c, 2, av, 2); if (util->notice && ci->flags & util->notice) - notice(whosends(ci), c->name, "%s command used for %s by %s", + ircdproto->SendMessage(whosends(ci), c->name, "%s command used for %s by %s", util->name, u2->nick, u->nick); } return MOD_CONT; diff --git a/src/modules/cs_appendtopic.c b/src/modules/cs_appendtopic.c index 2e01638db..7756cf49b 100644 --- a/src/modules/cs_appendtopic.c +++ b/src/modules/cs_appendtopic.c @@ -92,7 +92,7 @@ void my_cs_help(User * u) int my_cs_help_appendtopic(User * u) { moduleNoticeLang(s_ChanServ, u, LNG_APPENDTOPIC_SYNTAX); - notice(s_ChanServ, u->nick, " "); + ircdproto->SendMessage(s_ChanServ, u->nick, " "); moduleNoticeLang(s_ChanServ, u, LNG_CHAN_HELP_APPENDTOPIC); return MOD_STOP; } diff --git a/src/modules/cs_enforce.c b/src/modules/cs_enforce.c index 867823bc8..d20c1b5b3 100644 --- a/src/modules/cs_enforce.c +++ b/src/modules/cs_enforce.c @@ -254,9 +254,9 @@ void my_cs_help(User * u) int my_cs_help_enforce(User * u) { moduleNoticeLang(s_ChanServ, u, LNG_ENFORCE_SYNTAX); - notice(s_ChanServ, u->nick, " "); + ircdproto->SendMessage(s_ChanServ, u->nick, " "); moduleNoticeLang(s_ChanServ, u, LNG_CHAN_HELP_ENFORCE); - notice(s_ChanServ, u->nick, " "); + ircdproto->SendMessage(s_ChanServ, u->nick, " "); if (cbmodes['R'].flag != 0) moduleNoticeLang(s_ChanServ, u, LNG_CHAN_HELP_ENFORCE_R_ENABLED); else diff --git a/src/modules/cs_tban.c b/src/modules/cs_tban.c index 2b225207e..9c743664a 100644 --- a/src/modules/cs_tban.c +++ b/src/modules/cs_tban.c @@ -79,7 +79,7 @@ void myFullHelpSyntax(User * u) int myFullHelp(User * u) { myFullHelpSyntax(u); - notice(s_ChanServ, u->nick, ""); + ircdproto->SendMessage(s_ChanServ, u->nick, " "); moduleNoticeLang(s_ChanServ, u, TBAN_HELP_DETAIL); return MOD_CONT; } diff --git a/src/modules/hs_request.c b/src/modules/hs_request.c index 3ee45cebd..eefd816db 100644 --- a/src/modules/hs_request.c +++ b/src/modules/hs_request.c @@ -529,7 +529,7 @@ void show_list(User * u) int hs_help_request(User * u) { moduleNoticeLang(s_HostServ, u, LNG_REQUEST_SYNTAX); - notice(s_HostServ, u->nick, " "); + ircdproto->SendMessage(s_HostServ, u->nick, " "); moduleNoticeLang(s_HostServ, u, LNG_HELP_REQUEST); return MOD_CONT; @@ -539,7 +539,7 @@ int hs_help_activate(User * u) { if (is_host_setter(u)) { moduleNoticeLang(s_HostServ, u, LNG_ACTIVATE_SYNTAX); - notice(s_HostServ, u->nick, " "); + ircdproto->SendMessage(s_HostServ, u->nick, " "); moduleNoticeLang(s_HostServ, u, LNG_HELP_ACTIVATE); if (HSRequestMemoUser) moduleNoticeLang(s_HostServ, u, LNG_HELP_ACTIVATE_MEMO); @@ -554,7 +554,7 @@ int hs_help_reject(User * u) { if (is_host_setter(u)) { moduleNoticeLang(s_HostServ, u, LNG_REJECT_SYNTAX); - notice(s_HostServ, u->nick, " "); + ircdproto->SendMessage(s_HostServ, u->nick, " "); moduleNoticeLang(s_HostServ, u, LNG_HELP_REJECT); if (HSRequestMemoUser) moduleNoticeLang(s_HostServ, u, LNG_HELP_REJECT_MEMO); @@ -569,7 +569,7 @@ int hs_help_waiting(User * u) { if (is_host_setter(u)) { moduleNoticeLang(s_HostServ, u, LNG_WAITING_SYNTAX); - notice(s_HostServ, u->nick, " "); + ircdproto->SendMessage(s_HostServ, u->nick, " "); moduleNoticeLang(s_HostServ, u, LNG_HELP_WAITING); } else { notice_lang(s_HostServ, u, NO_HELP_AVAILABLE, "WAITING"); @@ -692,7 +692,7 @@ int hsreqevt_db_backup(int argc, char **argv) else ModuleDatabaseBackup(HSREQ_DEFAULT_DBNAME); } - + return MOD_CONT; } diff --git a/src/send.c b/src/send.c index 7474a380b..4da656d7f 100644 --- a/src/send.c +++ b/src/send.c @@ -265,32 +265,3 @@ void notice_help(const char *source, User * dest, int message, ...) } va_end(args); } - -/*************************************************************************/ - -/** - * Send a NOTICE from the given source to the given nick. - * @param source Orgin of the Message - * @param dest Destination of the Message - * @param fmt Format of the Message - * @param ... any number of parameters - * @return void - */ -void notice(char *source, const char *dest, const char *fmt, ...) -{ - va_list args; - char buf[BUFSIZE]; - *buf = '\0'; - - if (fmt) { - va_start(args, fmt); - vsnprintf(buf, BUFSIZE - 1, fmt, args); - - if (NSDefFlags & NI_MSG) { - ircdproto->SendPrivmsg(source, dest, buf); - } else { - ircdproto->SendNotice(source, dest, buf); - } - va_end(args); - } -} diff --git a/src/sessions.c b/src/sessions.c index e7621cc75..5b1eb2cb1 100644 --- a/src/sessions.c +++ b/src/sessions.c @@ -223,9 +223,9 @@ int add_session(const char *nick, const char *host, char *hostip) if (sessionlimit != 0 && session->count >= sessionlimit) { if (SessionLimitExceeded) - notice(s_OperServ, nick, SessionLimitExceeded, host); + ircdproto->SendMessage(s_OperServ, nick, SessionLimitExceeded, host); if (SessionLimitDetailsLoc) - notice(s_OperServ, nick, "%s", SessionLimitDetailsLoc); + ircdproto->SendMessage(s_OperServ, nick, "%s", SessionLimitDetailsLoc); /* We don't use kill_user() because a user stucture has not yet * been created. Simply kill the user. -TheShadow diff --git a/src/timeout.c b/src/timeout.c index 263d3e6e0..544d05435 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -6,9 +6,9 @@ * Please read COPYING and README for further details. * * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. - * - * $Id$ + * Based on the original code of Services by Andy Church. + * + * $Id$ * */ @@ -27,13 +27,13 @@ int send_timeout_list(User * u) { Timeout *to, *last; - notice(s_OperServ, u->nick, "Now: %ld", (long int) time(NULL)); + ircdproto->SendMessage(s_OperServ, u->nick, "Now: %ld", (long int) time(NULL)); for (to = timeouts, last = NULL; to; last = to, to = to->next) { - notice(s_OperServ, u->nick, "0x%p: %ld: 0x%p (0x%p)", + ircdproto->SendMessage(s_OperServ, u->nick, "0x%p: %ld: 0x%p (0x%p)", (void *) to, (long int) to->timeout, (void *) to->code, (void *) to->data); if (to->prev != last) - notice(s_OperServ, u->nick, + ircdproto->SendMessage(s_OperServ, u->nick, " to->prev incorrect! expected=0x%p seen=0x%p", (void *) last, (void *) to->prev); } |