1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 00:36:37 +02:00

BUILD : 1.7.4 (208) BUGS : none NOTES : New implementation for dynamic server /OS GLOBAL

git-svn-id: svn://svn.anope.org/anope/trunk@208 31f1291d-b8d6-0310-a050-a5561fc1590b


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@150 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b
2004-06-22 01:02:28 +00:00
parent ecfb58ca92
commit 2f0125c6fb
3 changed files with 34 additions and 13 deletions
+1 -1
View File
@@ -774,7 +774,7 @@ E void wallops(const char *source, const char *fmt, ...)
E void notice(const char *source, const char *dest, const char *fmt, ...)
FORMAT(printf,3,4);
E void notice_server(const char *source, Server * s, const char *fmt, ...)
E void notice_server(const char *source, Server *s, const char *fmt, ...)
FORMAT(printf,3,4);
E void notice_user(const char *source, User *u, const char *fmt, ...)
FORMAT(printf,3,4);
+28 -11
View File
@@ -1002,9 +1002,6 @@ static int do_help(User * u)
/*************************************************************************/
/* Global notice sending via GlobalNoticer. */
/* Added name tag for globalmsg -Certus */
static int do_global(User * u)
{
char *msg = strtok(NULL, "");
@@ -1019,24 +1016,44 @@ static int do_global(User * u)
return MOD_CONT;
}
Server *server_global(Server * s, char *msg)
{
Server *sl;
while (s) {
if (s->links) {
sl = server_global(s->links, msg);
if (sl)
s = sl;
else
s = s->next;
} else {
notice_server(s_GlobalNoticer, s, "%s", msg);
s = s->next;
}
}
return s;
}
void oper_global(char *nick, char *fmt, ...)
{
va_list args;
char msg[2048]; /* largest valid message is 512, this should cover any global */
Server *s;
char dmsg[2048]; /* largest valid message is 512, this should cover any global */
va_start(args, fmt);
vsnprintf(msg, sizeof(msg), fmt, args);
va_end(args);
s = first_server(0);
while (s) {
if ((nick) && (!AnonymousGlobal))
notice_server(s_GlobalNoticer, s, "[%s] %s", nick, msg);
else
notice_server(s_GlobalNoticer, s, "%s", msg);
s = next_server(0);
/* I don't like the way this is coded... */
if ((nick) && (!AnonymousGlobal)) {
snprintf(dmsg, sizeof(dmsg), "[%s] %s", nick, msg);
server_global(servlist, dmsg);
} else {
server_global(servlist, msg);
}
}
/*************************************************************************/
+5 -1
View File
@@ -8,10 +8,14 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="4"
VERSION_BUILD="207"
VERSION_BUILD="208"
# $Log$
#
# BUILD : 1.7.4 (208)
# BUGS : none
# NOTES : New implementation for dynamic server /OS GLOBAL
#
# BUILD : 1.7.4 (207)
# BUGS : N/A
# NOTES : Fixed PTLink m_server incorrect argument count