mirror of
https://github.com/anope/anope.git
synced 2026-07-03 08:53:12 +02:00
# BUILD : 1.7.14 (1087) # BUGS : 545 550 541 # NOTES : Various fixes.
git-svn-id: svn://svn.anope.org/anope/trunk@1087 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@811 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
parent
18c0fe03fc
commit
cc34de2be6
+25
@@ -254,6 +254,31 @@ void anope_cmd_notice2(char *source, char *dest, char *msg)
|
||||
ircdproto.ircd_cmd_notice2(source, dest, msg);
|
||||
}
|
||||
|
||||
void anope_cmd_action(char *source, char *dest, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buf[BUFSIZE];
|
||||
char actionbuf[BUFSIZE];
|
||||
|
||||
*buf = '\0';
|
||||
*actionbuf = '\0';
|
||||
|
||||
if (fmt) {
|
||||
va_start(args, fmt);
|
||||
vsnprintf(buf, BUFSIZE - 1, fmt, args);
|
||||
va_end(args);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!buf) {
|
||||
return;
|
||||
}
|
||||
snprintf(actionbuf, BUFSIZE - 1, "%cACTION %s %c", 1, buf, 1);
|
||||
ircdproto.ircd_cmd_privmsg(source, dest, actionbuf);
|
||||
}
|
||||
|
||||
|
||||
void anope_cmd_privmsg(char *source, char *dest, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
Reference in New Issue
Block a user