summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-15 23:09:41 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-15 23:09:41 +0000
commitc5a376cbc8068552a909de78fa1fcfe47ebb7334 (patch)
treee7fb1de344ea95baa5854220f9e51e9026d9ba71 /src
parent629422ed862ea56f40785f9918a448ae67c6f52a (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/channels.c3
-rw-r--r--src/core/bs_botlist.c6
-rw-r--r--src/core/bs_info.c4
-rw-r--r--src/core/cs_list.c3
-rw-r--r--src/core/ns_access.c4
-rw-r--r--src/core/ns_help.c2
-rw-r--r--src/core/ns_list.c4
-rw-r--r--src/core/os_ignore.c2
-rw-r--r--src/modules.c2
-rw-r--r--src/modules/os_info.c6
-rw-r--r--src/send.c26
11 files changed, 15 insertions, 47 deletions
diff --git a/src/channels.c b/src/channels.c
index 6e52139f7..d7e97d62f 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -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);
}
/**
diff --git a/src/core/bs_botlist.c b/src/core/bs_botlist.c
index 1a21144b5..190f3d9f9 100644
--- a/src/core/bs_botlist.c
+++ b/src/core/bs_botlist.c
@@ -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++;
}
}
diff --git a/src/core/bs_info.c b/src/core/bs_info.c
index ff7c2c932..9d671c504 100644
--- a/src/core/bs_info.c
+++ b/src/core/bs_info.c
@@ -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:
diff --git a/src/core/cs_list.c b/src/core/cs_list.c
index 913c76e5a..f4ccc843a 100644
--- a/src/core/cs_list.c
+++ b/src/core/cs_list.c
@@ -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++;
}
diff --git a/src/core/ns_access.c b/src/core/ns_access.c
index 7afeb1559..e8e43b298 100644
--- a/src/core/ns_access.c
+++ b/src/core/ns_access.c
@@ -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;
diff --git a/src/core/ns_help.c b/src/core/ns_help.c
index daef3c97a..6b335bd24 100644
--- a/src/core/ns_help.c
+++ b/src/core/ns_help.c
@@ -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);
diff --git a/src/core/ns_list.c b/src/core/ns_list.c
index 938fc1fbe..407d1bcd1 100644
--- a/src/core/ns_list.c
+++ b/src/core/ns_list.c
@@ -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);
}
}
}
diff --git a/src/core/os_ignore.c b/src/core/os_ignore.c
index a278b9499..2585af0c7 100644
--- a/src/core/os_ignore.c
+++ b/src/core/os_ignore.c
@@ -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;
}
diff --git a/src/modules.c b/src/modules.c
index 79be7d742..caf25fa04 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -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 {
diff --git a/src/modules/os_info.c b/src/modules/os_info.c
index 7d4b7be8c..0c5e040b6 100644
--- a/src/modules/os_info.c
+++ b/src/modules/os_info.c
@@ -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;
diff --git a/src/send.c b/src/send.c
index 6e3012714..4f05d11ad 100644
--- a/src/send.c
+++ b/src/send.c
@@ -110,32 +110,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
* @param dest Destination of the Notice