mirror of
https://github.com/anope/anope.git
synced 2026-06-29 22:46:37 +02:00
Removed notice_user() and replaced all calls with Used::SendMessage.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2078 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -809,8 +809,6 @@ E void send_cmd(const std::string &source, const char *fmt, ...) FORMAT(printf,2
|
||||
|
||||
E void notice_server(char *source, Server * s, const char *fmt, ...)
|
||||
FORMAT(printf,3,4);
|
||||
E void notice_user(char *source, User *u, const char *fmt, ...)
|
||||
FORMAT(printf,3,4);
|
||||
|
||||
E void notice_list(const char *source, const char *dest, char **text); // MARK_DEPRECATED;
|
||||
E void notice_lang(const char *source, User *dest, int message, ...); // MARK_DEPRECATED;
|
||||
|
||||
+1
-2
@@ -1555,8 +1555,7 @@ void chan_adduser2(User * user, Channel * c)
|
||||
/* Added channelname to entrymsg - 30.03.2004, Certus */
|
||||
/* Also, don't send the entrymsg when bursting -GD */
|
||||
if (c->ci && c->ci->entry_message && is_sync(user->server))
|
||||
notice_user(whosends(c->ci)->nick, user, "[%s] %s", c->name,
|
||||
c->ci->entry_message);
|
||||
user->SendMessage(whosends(c->ci)->nick, "[%s] %s", c->name, c->ci->entry_message);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -40,8 +40,7 @@ class CommandBSBotList : public Command
|
||||
if (!count)
|
||||
notice_lang(s_BotServ, u, BOT_BOTLIST_HEADER);
|
||||
count++;
|
||||
notice_user(s_BotServ, u, " %-15s (%s@%s)", bi->nick,
|
||||
bi->user, bi->host);
|
||||
u->SendMessage(s_BotServ, " %-15s (%s@%s)", bi->nick, bi->user, bi->host);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,8 +51,7 @@ class CommandBSBotList : public Command
|
||||
for (i = 0; i < 256; i++) {
|
||||
for (bi = botlists[i]; bi; bi = bi->next) {
|
||||
if (bi->flags & BI_PRIVATE) {
|
||||
notice_user(s_BotServ, u, " %-15s (%s@%s)",
|
||||
bi->nick, bi->user, bi->host);
|
||||
u->SendMessage(s_BotServ, " %-15s (%s@%s)", bi->nick, bi->user, bi->host);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -33,7 +33,7 @@ class CommandBSInfo : public Command
|
||||
for (ci = chanlists[i]; ci; ci = ci->next) {
|
||||
if (ci->bi == bi) {
|
||||
if (strlen(buf) + strlen(ci->name) > 300) {
|
||||
notice_user(s_BotServ, u, "%s", buf);
|
||||
u->SendMessage(s_BotServ, "%s", buf);
|
||||
*buf = 0;
|
||||
end = buf;
|
||||
}
|
||||
@@ -45,7 +45,7 @@ class CommandBSInfo : public Command
|
||||
}
|
||||
|
||||
if (*buf)
|
||||
notice_user(s_BotServ, u, "%s", buf);
|
||||
u->SendMessage(s_BotServ, "%s", buf);
|
||||
return;
|
||||
}
|
||||
public:
|
||||
|
||||
+1
-2
@@ -163,8 +163,7 @@ public:
|
||||
ci->name, ci->desc ? ci->desc : "");
|
||||
}
|
||||
|
||||
notice_user(s_ChanServ, u, " %c%s",
|
||||
noexpire_char, buf);
|
||||
u->SendMessage(s_ChanServ, " %c%s", noexpire_char, buf);
|
||||
}
|
||||
count++;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class CommandNSAccess : public Command
|
||||
{
|
||||
if (mask && !match_wild(mask, *access))
|
||||
continue;
|
||||
notice_user(s_NickServ, u, " %s", *access);
|
||||
u->SendMessage(s_NickServ, " %s", *access);
|
||||
}
|
||||
|
||||
return MOD_CONT;
|
||||
@@ -145,7 +145,7 @@ class CommandNSAccess : public Command
|
||||
{
|
||||
if (mask && !match_wild(mask, *access))
|
||||
continue;
|
||||
notice_user(s_NickServ, u, " %s", *access);
|
||||
u->SendMessage(s_NickServ, " %s", *access);
|
||||
}
|
||||
|
||||
return MOD_CONT;
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ class CommandNSHelp : public Command
|
||||
int i;
|
||||
notice_help(s_NickServ, u, NICK_HELP_SET_LANGUAGE);
|
||||
for (i = 0; i < NUM_LANGS && langlist[i] >= 0; ++i)
|
||||
notice_user(s_NickServ, u, " %2d) %s", i + 1, langnames[langlist[i]]);
|
||||
u->SendMessage(s_NickServ, " %2d) %s", i + 1, langnames[langlist[i]]);
|
||||
}
|
||||
else
|
||||
mod_help_cmd(s_NickServ, u, NICKSERV, cmd);
|
||||
|
||||
+2
-2
@@ -159,7 +159,7 @@ class CommandNSList : public Command
|
||||
snprintf(buf, sizeof(buf), "%-20s [Suspended]", na->nick);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), "%-20s %s", na->nick, na->last_usermask);
|
||||
notice_user(s_NickServ, u, " %c%s", noexpire_char, buf);
|
||||
u->SendMessage(s_NickServ, " %c%s", noexpire_char, buf);
|
||||
}
|
||||
++count;
|
||||
}
|
||||
@@ -180,7 +180,7 @@ class CommandNSList : public Command
|
||||
if (++nnicks <= NSListMax)
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "%-20s [UNCONFIRMED]", nr->nick);
|
||||
notice_user(s_NickServ, u, " %c%s", noexpire_char, buf);
|
||||
u->SendMessage(s_NickServ, " %c%s", noexpire_char, buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ class CommandOSIgnore : public Command
|
||||
|
||||
notice_lang(s_OperServ, u, OPER_IGNORE_LIST);
|
||||
for (id = ignore; id; id = id->next)
|
||||
notice_user(s_OperServ, u, "%s", id->mask);
|
||||
u->SendMessage(s_OperServ, "%s", id->mask);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1069,7 +1069,7 @@ void Module::NoticeLang(char *source, User * u, int number, ...)
|
||||
if (*s)
|
||||
*s++ = '\0';
|
||||
strscpy(outbuf, t, sizeof(outbuf));
|
||||
notice_user(source, u, "%s", outbuf);
|
||||
u->SendMessage(source, "%s", outbuf);
|
||||
}
|
||||
delete [] buf;
|
||||
} else {
|
||||
|
||||
@@ -157,9 +157,7 @@ class CommandNSInfo : public Command
|
||||
/* If we have any info on this user */
|
||||
char *c;
|
||||
if (na->nc->GetExt("os_info", c))
|
||||
{
|
||||
notice_user(s_NickServ, u, " OperInfo: %s", c);
|
||||
}
|
||||
u->SendMessage(s_NickServ, " OperInfo: %s", c);
|
||||
}
|
||||
}
|
||||
return MOD_CONT;
|
||||
@@ -271,7 +269,7 @@ class CommandCSInfo : public Command
|
||||
/* If we have any info on this channel */
|
||||
char *c;
|
||||
if (ci->GetExt("os_info", c))
|
||||
notice_user(s_ChanServ, u, " OperInfo: %s", c);
|
||||
u->SendMessage(s_ChanServ, " OperInfo: %s", c);
|
||||
}
|
||||
}
|
||||
return MOD_CONT;
|
||||
|
||||
-26
@@ -109,32 +109,6 @@ void notice_server(char *source, Server * s, const char *fmt, ...)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/**
|
||||
* Send a notice to a user
|
||||
* @param source Orgin of the Message
|
||||
* @param u User Struct
|
||||
* @param fmt Format of the Message
|
||||
* @param ... any number of parameters
|
||||
* @return void
|
||||
*/
|
||||
void notice_user(char *source, User * u, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buf[BUFSIZE];
|
||||
*buf = '\0';
|
||||
|
||||
if (fmt) {
|
||||
va_start(args, fmt);
|
||||
vsnprintf(buf, BUFSIZE - 1, fmt, args);
|
||||
|
||||
u->SendMessage(source, "%s", buf);
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/**
|
||||
* Send a NULL-terminated array of text as NOTICEs.
|
||||
* @param source Orgin of the Message
|
||||
|
||||
Reference in New Issue
Block a user