]>
jfr.im git - irc/quakenet/newserv.git/blob - channel/channelhandlers.c
7 #include "../server/server.h"
8 #include "../nick/nick.h"
9 #include "../lib/irc_string.h"
10 #include "../irc/irc_config.h"
11 #include "../parser/parser.h"
12 #include "../irc/irc.h"
13 #include "../lib/base64.h"
14 #include "../lib/strlfunc.h"
16 int handleburstmsg(void *source
, int cargc
, char **cargv
) {
24 int waslimit
,waskeyed
;
26 unsigned long currentmode
;
29 /* (we don't see the first 2 params in cargc) */
30 /* AK B #+lod+ 1017561154 +tnk eits ATJWu:o,AiW1a,Ag3lV,AiWnl,AE6oI :%*!@D577A90D.kabel.telenet.be */
33 Error("channel",ERR_WARNING
,"Burst message with only %d parameters",cargc
);
37 timestamp
=strtol(cargv
[1],NULL
,10);
39 if ((cp
=findchannel(cargv
[0]))==NULL
) {
40 /* We don't have this channel already */
41 cp
=createchannel(cargv
[0]);
42 cp
->timestamp
=timestamp
;
46 if (timestamp
<cp
->timestamp
) {
47 /* The incoming timestamp is older. Erase all our current channel modes, and the topic. */
48 cp
->timestamp
=timestamp
;
49 freesstring(cp
->topic
);
57 /* Remove all +v, +o we currently have */
58 for(i
=0;i
<cp
->users
->hashsize
;i
++) {
59 if (cp
->users
->content
[i
]!=nouser
) {
60 cp
->users
->content
[i
]&=CU_NUMERICMASK
;
63 } else if (timestamp
>cp
->timestamp
) {
64 /* The incoming timestamp is greater. Ignore any incoming modes they may happen to set */
69 /* OK, dealt with the name and timestamp.
70 * Loop over the remaining args */
71 for (arg
=2;arg
<cargc
;arg
++) {
72 if (cargv
[arg
][0]=='+') {
75 /* We ignore the modes, but we need to see if they include +l or +k
76 * so that we can ignore their corresponding values */
77 for (charp
=cargv
[arg
];*charp
;charp
++) {
78 if (*charp
=='k' || *charp
=='l') {
83 /* Clear off the limit and key flags before calling setflags so we can see if the burst tried to set them */
84 /* If the burst doesn't set them, we restore them afterwards */
85 waslimit
=IsLimit(cp
); ClearLimit(cp
);
86 waskeyed
=IsKey(cp
); ClearKey(cp
);
87 /* We can then use the flag function for these modes */
88 setflags(&(cp
->flags
),CHANMODE_ALL
,cargv
[arg
],cmodeflags
,REJECT_NONE
);
89 /* Pick up the limit and key, if they were set. Note that the limit comes first */
90 if (IsLimit(cp
)) { /* A limit was SET by the burst */
92 /* Ran out of args -- damn ircd is spewing out crap again */
93 Error("channel",ERR_WARNING
,"Burst +l with no argument");
94 break; /* "break" being the operative word */
96 newlimit
=strtol(cargv
[arg
],NULL
,10);
98 if (cp
->limit
>0 && waslimit
) {
99 /* We had a limit before -- we now have the lowest one of the two */
100 if (newlimit
<cp
->limit
) {
104 /* No limit before -- we just have the new one */
107 } else if (waslimit
) {
108 SetLimit(cp
); /* We had a limit before, but the burst didn't set one. Restore flag. */
111 if (IsKey(cp
)) { /* A key was SET by the burst */
113 /* Ran out of args -- oopsie! */
114 Error("channel",ERR_WARNING
,"Burst +k with no argument");
118 /* We had a key before -- alphabetically first wins */
119 if (ircd_strcmp(cargv
[arg
],cp
->key
->content
)<0) {
120 /* Replace our key */
121 freesstring(cp
->key
);
122 cp
->key
=getsstring(cargv
[arg
],KEYLEN
);
125 /* No key before -- just the new one */
126 cp
->key
=getsstring(cargv
[arg
],KEYLEN
);
128 } else if (waskeyed
) {
129 SetKey(cp
); /* We had a key before, but the burst didn't set one. Restore flag. */
132 } else if (cargv
[arg
][0]=='%') {
133 /* We have one or more bans here */
134 nextnum
=cargv
[arg
]+1;
136 /* Split off the next ban */
137 for (charp
=nextnum
;*charp
;charp
++) {
148 /* List of numerics */
149 nextnum
=charp
=cargv
[arg
];
151 while (*nextnum
!='\0') {
152 /* Step over the next numeric */
163 } else if (*charp
==':') {
168 for (;*charp
;charp
++) {
170 currentmode
|=CUMODE_VOICE
;
171 } else if (*charp
=='o') {
172 currentmode
|=CUMODE_OP
;
173 } else if (*charp
==',') {
178 /* If we're ignore incoming modes, zap it to zero again */
183 /* OK. At this point charp points to either '\0' if we're at the end,
184 * or the start of the next numeric otherwise. nextnum points at a valid numeric
185 * we need to add, and currentmode reflects the correct mode */
186 addnicktochannel(cp
,(numerictolong(nextnum
,5)|currentmode
));
191 if (cp
->users
->totalusers
==0) {
192 /* Oh dear, the channel is now empty. Perhaps one of those
193 * charming empty burst messages you get sometimes.. */
195 /* I really don't think this can happen, can it..? */
196 /* Only send the LOSTCHANNEL if the channel existed before */
197 triggerhook(HOOK_CHANNEL_LOSTCHANNEL
,cp
);
201 /* If this is a new channel, we do the NEWCHANNEL hook also */
203 triggerhook(HOOK_CHANNEL_NEWCHANNEL
,cp
);
205 /* Just one hook to say "something happened to this channel" */
206 triggerhook(HOOK_CHANNEL_BURST
,cp
);
212 int handlejoinmsg(void *source
, int cargc
, char **cargv
) {
226 /* We must have received a timestamp too */
227 timestamp
=strtol(cargv
[1],NULL
,10);
230 /* Find out who we are talking about here */
231 np
=getnickbynumericstr(source
);
233 Error("channel",ERR_WARNING
,"Channel join from non existent user %s",source
);
237 nextchan
=pos
=cargv
[0];
238 while (*nextchan
!='\0') {
239 /* Find the next chan position */
240 for (;*pos
!='\0' && *pos
!=',';pos
++)
248 /* OK, pos now points at either null or the next chan
249 * and nextchan now points at the channel name we want to parse next */
251 if(nextchan
[0]=='0' && nextchan
[1]=='\0') {
252 /* Leave all channels
253 * We do this as if they were leaving the network,
254 * then vape their channels array and start again */
255 ch
=(channel
**)(np
->channels
->content
);
256 for(i
=0;i
<np
->channels
->cursi
;i
++) {
261 triggerhook(HOOK_CHANNEL_PART
,harg
);
262 delnickfromchannel(ch
[i
],np
->numeric
,0);
264 array_free(np
->channels
);
265 array_init(np
->channels
,sizeof(channel
*));
267 /* It's an actual channel join */
269 if ((cp
=findchannel(nextchan
))==NULL
) {
270 /* User joined non-existent channel - create it. Note that createchannel automatically
271 * puts the right magic timestamp in for us */
272 Error("channel",ERR_DEBUG
,"User %s joined non existent channel %s.",np
->nick
,nextchan
);
273 cp
=createchannel(nextchan
);
276 if (cp
->timestamp
==MAGIC_REMOTE_JOIN_TS
&& timestamp
) {
277 /* No valid timestamp on the chan and we received one -- set */
278 cp
->timestamp
=timestamp
;
280 /* OK, this is slightly inefficient since we turn the nick * into a numeric,
281 * and addnicktochannel then converts it back again. BUT it's fewer lines of code :) */
282 if (addnicktochannel(cp
,np
->numeric
)) {
283 /* The user wasn't added */
288 chanindex
*cip
=cp
->index
;
290 /* If we just created a channel, flag it */
292 triggerhook(HOOK_CHANNEL_NEWCHANNEL
,cp
);
295 /* Don't send HOOK_CHANNEL_JOIN if the channel doesn't exist any
296 * more (can happen if something destroys it in response to
297 * HOOK_CHANNEL_NEWCHANNEL) */
298 if (cp
== cip
->channel
) {
302 triggerhook(HOOK_CHANNEL_JOIN
,harg
);
311 int handlecreatemsg(void *source
, int cargc
, char **cargv
) {
323 timestamp
=strtol(cargv
[1],NULL
,10);
325 /* Find out who we are talking about here */
326 np
=getnickbynumericstr(source
);
328 Error("channel",ERR_WARNING
,"Channel create from non existent user %s",source
);
332 nextchan
=pos
=cargv
[0];
333 while (*nextchan
!='\0') {
334 /* Find the next chan position */
335 for (;*pos
!='\0' && *pos
!=',';pos
++)
343 /* OK, pos now points at either null or the next chan
344 * and nextchan now points at the channel name we want to parse next */
346 /* It's a channel create */
347 if ((cp
=findchannel(nextchan
))==NULL
) {
348 /* This is the expected case -- the channel didn't exist before */
349 cp
=createchannel(nextchan
);
350 cp
->timestamp
=timestamp
;
353 Error("channel",ERR_DEBUG
,"Received CREATE for already existing channel %s",cp
->index
->name
->content
);
354 if (cp
->timestamp
==MAGIC_REMOTE_JOIN_TS
&& timestamp
) {
355 /* No valid timestamp on the chan and we received one -- set */
356 cp
->timestamp
=timestamp
;
360 /* Add the user to the channel, preopped */
361 if (addnicktochannel(cp
,(np
->numeric
)|CUMODE_OP
)) {
366 chanindex
*cip
= cp
->index
;
368 /* Flag the channel as new if necessary */
370 triggerhook(HOOK_CHANNEL_NEWCHANNEL
,cp
);
373 /* If HOOK_CHANNEL_NEWCHANNEL has caused the channel to be deleted,
374 * don't trigger the CREATE hook. */
375 if (cip
->channel
== cp
) {
379 triggerhook(HOOK_CHANNEL_CREATE
,harg
);
388 int handlepartmsg(void *source
, int cargc
, char **cargv
) {
399 Error("channel",ERR_WARNING
,"PART with too many parameters (%d)",cargc
);
403 harg
[2]=(void *)cargv
[1];
408 /* Find out who we are talking about here */
409 np
=getnickbynumericstr(source
);
411 Error("channel",ERR_WARNING
,"PART from non existent numeric %s",source
);
417 nextchan
=pos
=cargv
[0];
418 while (*nextchan
!='\0') {
419 /* Find the next chan position */
420 for (;*pos
!='\0' && *pos
!=',';pos
++)
428 /* OK, pos now points at either null or the next chan
429 * and nextchan now points at the channel name we want to parse next */
431 if ((cp
=findchannel(nextchan
))==NULL
) {
432 /* Erm, parting a channel that's not there?? */
433 Error("channel",ERR_WARNING
,"Nick %s left non-existent channel %s",np
->nick
,nextchan
);
435 /* Trigger hook *FIRST* */
437 triggerhook(HOOK_CHANNEL_PART
,harg
);
439 delnickfromchannel(cp
,np
->numeric
,1);
447 int handlekickmsg(void *source
, int cargc
, char **cargv
) {
456 /* Find out who we are talking about here */
457 if ((np
=getnickbynumericstr(cargv
[1]))==NULL
) {
458 Error("channel",ERR_DEBUG
,"Non-existant numeric %s kicked from channel %s",source
,cargv
[0]);
462 /* And who did the kicking */
463 if (((char *)source
)[2]=='\0') {
464 /* 'Twas a server.. */
466 } else if ((kicker
=getnickbynumericstr((char *)source
))==NULL
) {
467 /* It looks strange, but we let the kick go through anyway */
468 Error("channel",ERR_DEBUG
,"Kick from non-existant nick %s",(char *)source
);
471 /* And find out which channel */
472 if ((cp
=findchannel(cargv
[0]))==NULL
) {
473 /* OK, not a channel that actually exists then.. */
474 Error("channel",ERR_DEBUG
,"Nick %s kicked from non-existent channel %s",np
->nick
,cargv
[0]);
476 /* Before we do anything else, we have to acknowledge the kick to the network */
477 if (homeserver(np
->numeric
)==mylongnum
) {
478 irc_send("%s L %s",longtonumeric(np
->numeric
,5),cp
->index
->name
->content
);
481 /* Trigger hook *FIRST* */
486 triggerhook(HOOK_CHANNEL_KICK
,harg
);
488 /* We let delnickfromchannel() worry about whether this nick is actually on this channel */
489 delnickfromchannel(cp
,np
->numeric
,1);
495 int handletopicmsg(void *source
, int cargc
, char **cargv
) {
499 time_t topictime
=0, timestamp
=0;
506 topictime
=strtol(cargv
[cargc
-2], NULL
, 10);
509 timestamp
=strtol(cargv
[cargc
-3], NULL
, 10);
511 if ((np
=getnickbynumericstr((char *)source
))==NULL
) {
512 /* We should check the sender exists, but we still change the topic even if it doesn't */
513 Error("channel",ERR_WARNING
,"Topic change by non-existent user %s",(char *)source
);
516 /* Grab channel pointer */
517 if ((cp
=findchannel(cargv
[0]))==NULL
) {
518 /* We're not going to create a channel for the sake of a topic.. */
521 if (timestamp
&& (cp
->timestamp
< timestamp
)) {
522 /* Ignore topic change for younger channel
523 * (note that topic change for OLDER channel should be impossible!) */
526 if (topictime
&& (cp
->topictime
> topictime
)) {
527 /* Ignore topic change with older topic */
530 if (cp
->topic
!=NULL
) {
531 freesstring(cp
->topic
);
533 if (cargv
[cargc
-1][0]=='\0') {
537 cp
->topic
=getsstring(cargv
[cargc
-1],TOPICLEN
);
538 cp
->topictime
=topictime
?topictime
:getnettime();
543 triggerhook(HOOK_CHANNEL_TOPIC
,harg
);
550 * Note that this function is also used for processing OPMODE messages.
551 * There is no checking on the source etc. anyway, so this should be OK.
552 * (we are trusting ircd not to feed us bogus modes)
555 int handlemodemsg(void *source
, int cargc
, char **cargv
) {
570 if (cargv
[0][0]!='#' && cargv
[0][0]!='+') {
571 /* Not a channel, ignore */
575 if ((cp
=findchannel(cargv
[0]))==NULL
) {
576 /* No channel, abort */
577 Error("channel",ERR_WARNING
,"Mode change on non-existent channel %s",cargv
[0]);
581 if (((char *)source
)[2]=='\0') {
582 /* Server mode change, treat as divine intervention */
584 } else if ((np
=getnickbynumericstr((char *)source
))==NULL
) {
585 /* No sender, continue but moan */
586 Error("channel",ERR_WARNING
,"Mode change by non-existent user %s on channel %s",(char *)source
,cp
->index
->name
->content
);
589 /* Set up the hook data */
593 /* Process the mode string one character at a time */
594 /* Maybe I'll write this more intelligently one day if I can comprehend the ircu code that does this */
595 for (modestr
=cargv
[1];*modestr
;modestr
++) {
597 /* Set whether we are adding or removing modes */
607 /* Simple modes: just set or clear based on value of dir */
610 if (dir
) { SetNoExtMsg(cp
); } else { ClearNoExtMsg(cp
); }
611 changes
|= MODECHANGE_MODES
;
615 if (dir
) { SetTopicLimit(cp
); } else { ClearTopicLimit(cp
); }
616 changes
|= MODECHANGE_MODES
;
620 if (dir
) { SetSecret(cp
); ClearPrivate(cp
); } else { ClearSecret(cp
); }
621 changes
|= MODECHANGE_MODES
;
625 if (dir
) { SetPrivate(cp
); ClearSecret(cp
); } else { ClearPrivate(cp
); }
626 changes
|= MODECHANGE_MODES
;
630 if (dir
) { SetInviteOnly(cp
); } else { ClearInviteOnly(cp
); }
631 changes
|= MODECHANGE_MODES
;
635 if (dir
) { SetModerated(cp
); } else { ClearModerated(cp
); }
636 changes
|= MODECHANGE_MODES
;
640 if (dir
) { SetNoColour(cp
); } else { ClearNoColour(cp
); }
641 changes
|= MODECHANGE_MODES
;
645 if (dir
) { SetNoCTCP(cp
); } else { ClearNoCTCP(cp
); }
646 changes
|= MODECHANGE_MODES
;
650 if (dir
) { SetRegOnly(cp
); } else { ClearRegOnly(cp
); }
651 changes
|= MODECHANGE_MODES
;
655 if (dir
) { SetDelJoins(cp
); } else { ClearDelJoins(cp
); }
656 changes
|= MODECHANGE_MODES
;
660 if (dir
) { SetNoQuitMsg(cp
); } else { ClearNoQuitMsg(cp
); }
661 changes
|= MODECHANGE_MODES
;
665 if (dir
) { SetNoNotice(cp
); } else { ClearNoNotice(cp
); }
666 changes
|= MODECHANGE_MODES
;
670 if (dir
) { SetModNoAuth(cp
); } else { ClearModNoAuth(cp
); }
671 changes
|= MODECHANGE_MODES
;
675 if (dir
) { SetSingleTarg(cp
); } else { ClearSingleTarg(cp
); }
676 changes
|= MODECHANGE_MODES
;
679 /* Parameter modes: advance parameter and possibly read it in */
683 /* +l uses a parameter, but -l does not.
684 * If there is no parameter, don't set the mode.
685 * I guess we should moan too in that case, but
686 * they might be even nastier to us if we do ;) */
688 cp
->limit
=strtol(cargv
[arg
++],NULL
,10);
695 changes
|= MODECHANGE_MODES
;
700 /* +k uses a parameter in both directions */
702 freesstring(cp
->key
); /* It's probably NULL, but be safe */
703 cp
->key
=getsstring(cargv
[arg
++],KEYLEN
);
707 freesstring(cp
->key
);
710 arg
++; /* Eat the arg without looking at it, even if it's not there */
712 changes
|= MODECHANGE_MODES
;
720 if((lp
=getnumerichandlefromchanhash(cp
->users
,numerictolong(cargv
[arg
++],5)))==NULL
) {
721 /* They're not on the channel; MODE crossed with part/kill/kick/blah */
722 Error("channel",ERR_DEBUG
,"Mode change for user %s not on channel %s",cargv
[arg
-1],cp
->index
->name
->content
);
724 if ((target
=getnickbynumeric(*lp
))==NULL
) {
725 /* This really is a fuckup, we found them on the channel but there isn't a user with that numeric */
726 /* This means there's a serious bug in the nick/channel tracking code */
727 Error("channel",ERR_ERROR
,"Mode change for user %s on channel %s who doesn't exist",cargv
[arg
-1],cp
->index
->name
->content
);
728 } else { /* Do the mode change whilst admiring the beautiful code layout */
730 if (*modestr
=='o') { if (dir
) { *lp
|= CUMODE_OP
; hooknum
=HOOK_CHANNEL_OPPED
; } else
731 { *lp
&= ~CUMODE_OP
; hooknum
=HOOK_CHANNEL_DEOPPED
; } }
732 else { if (dir
) { *lp
|= CUMODE_VOICE
; hooknum
=HOOK_CHANNEL_VOICED
; } else
733 { *lp
&= ~CUMODE_VOICE
; hooknum
=HOOK_CHANNEL_DEVOICED
; } }
734 triggerhook(hooknum
,harg
);
738 changes
|= MODECHANGE_USERS
;
744 setban(cp
,cargv
[arg
++]);
745 triggerhook(HOOK_CHANNEL_BANSET
,harg
);
747 clearban(cp
,cargv
[arg
++],0);
748 triggerhook(HOOK_CHANNEL_BANCLEAR
,harg
);
751 changes
|= MODECHANGE_BANS
;
755 Error("channel",ERR_DEBUG
,"Unknown mode char '%c' %s on %s",*modestr
,dir
?"set":"cleared",cp
->index
->name
->content
);
760 harg
[2]=(void *)((long)changes
);
761 triggerhook(HOOK_CHANNEL_MODECHANGE
,(void *)harg
);
766 * Deal with 2.10.11ism: CLEARMODE
768 * [hAAA CM #twilightzone ovpsmikbl
771 int handleclearmodemsg(void *source
, int cargc
, char **cargv
) {
776 unsigned long usermask
=0;
784 if ((cp
=findchannel(cargv
[0]))==NULL
) {
785 /* No channel, abort */
786 Error("channel",ERR_WARNING
,"Mode change on non-existent channel %s",cargv
[0]);
790 if (((char *)source
)[2]=='\0') {
791 /* Server mode change? (I don't think servers are allowed to do CLEARMODE) */
793 } else if ((np
=getnickbynumericstr((char *)source
))==NULL
) {
794 /* No sender, continue but moan */
795 Error("channel",ERR_WARNING
,"Mode change by non-existent user %s on channel %s",(char *)source
,cp
->index
->name
->content
);
801 for (mcp
=cargv
[1];*mcp
;mcp
++) {
804 usermask
|= CUMODE_OP
;
805 changes
|= MODECHANGE_USERS
;
809 usermask
|= CUMODE_VOICE
;
810 changes
|= MODECHANGE_USERS
;
815 changes
|= MODECHANGE_MODES
;
820 changes
|= MODECHANGE_MODES
;
825 changes
|= MODECHANGE_MODES
;
830 changes
|= MODECHANGE_MODES
;
835 changes
|= MODECHANGE_MODES
;
840 changes
|= MODECHANGE_MODES
;
845 changes
|= MODECHANGE_MODES
;
850 changes
|= MODECHANGE_MODES
;
855 changes
|= MODECHANGE_MODES
;
860 changes
|= MODECHANGE_MODES
;
865 changes
|= MODECHANGE_MODES
;
870 changes
|= MODECHANGE_MODES
;
875 changes
|= MODECHANGE_MODES
;
880 changes
|= MODECHANGE_MODES
;
885 changes
|= MODECHANGE_BANS
;
889 /* This is all safe even if there is no key atm */
890 freesstring(cp
->key
);
893 changes
|= MODECHANGE_MODES
;
899 changes
|= MODECHANGE_MODES
;
905 /* We have to strip something off each user */
906 for (i
=0;i
<cp
->users
->hashsize
;i
++) {
907 if (cp
->users
->content
[i
]!=nouser
&& (cp
->users
->content
[i
] & usermask
)) {
908 /* This user exists and has at least one of the modes we're clearing */
909 if ((target
=getnickbynumeric(cp
->users
->content
[i
]))==NULL
) {
910 /* This really is a fuckup, we found them on the channel but there isn't a user with that numeric */
911 /* This means there's a serious bug in the nick/channel tracking code */
912 Error("channel",ERR_ERROR
,"CLEARMODE failed: user on channel who doesn't exist?");
915 /* Yes, these are deliberate three way bitwise ANDs.. */
916 if (cp
->users
->content
[i
] & usermask
& CUMODE_OP
)
917 triggerhook(HOOK_CHANNEL_DEOPPED
, harg
);
918 if (cp
->users
->content
[i
] & usermask
& CUMODE_VOICE
)
919 triggerhook(HOOK_CHANNEL_DEVOICED
, harg
);
920 cp
->users
->content
[i
] &= ~usermask
;
926 harg
[2]=(void *)((long)changes
);
927 triggerhook(HOOK_CHANNEL_MODECHANGE
, harg
);
931 void handlewhoischannels(int hooknum
, void *arg
) {
938 void **args
= (void **)arg
;
939 nick
*sender
= (nick
*)args
[0], *target
= (nick
*)args
[1];
941 if(IsService(target
) || IsHideChan(target
))
944 chans
= (channel
**)(target
->channels
->content
);
949 /* Not handling delayed joins. */
950 for(i
=target
->channels
->cursi
-1;i
>=0;i
--) {
951 /* Secret / Private channels: only show if the sender is on the channel as well */
952 if(IsSecret(chans
[i
]) || IsPrivate(chans
[i
])) {
953 if (!getnumerichandlefromchanhash(chans
[i
]->users
, sender
->numeric
))
957 name
= chans
[i
]->index
->name
;
958 if (bufpos
+ name
->length
> 508) { /* why 508? - need room for -@#channame\0 + 1 slack */
959 irc_send("%s", buffer
);
964 if(buffer
[0] == '\0')
965 bufpos
=snprintf(buffer
, sizeof(buffer
), ":%s 319 %s %s :", myserver
->content
, sender
->nick
, target
->nick
);
967 num
= getnumerichandlefromchanhash(chans
[i
]->users
, target
->numeric
);
969 /* Adding these flags might make the string "unsafe" (without terminating \0). */
970 /* sprintf'ing the channel name afterwards is guaranteed to fix it though */
972 buffer
[bufpos
++]='-';
973 if (*num
& CUMODE_OP
)
974 buffer
[bufpos
++]='@';
975 else if (*num
& CUMODE_VOICE
)
976 buffer
[bufpos
++]='+';
978 bufpos
+= sprintf(buffer
+bufpos
, "%s ",name
->content
);
981 if (buffer
[0] != '\0')
982 irc_send("%s", buffer
);