1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-08 10:23:13 +02:00

- Remove sendto_channelprefix_butone_tok().

This commit is contained in:
William Pitcock
2013-05-19 20:59:29 +00:00
parent ec440be9a3
commit a9ce94de9b
2 changed files with 0 additions and 83 deletions
-2
View File
@@ -267,8 +267,6 @@ extern void sendto_message_one(aClient *to, aClient *from, char *sender,
#define PREFIX_OWNER 0x10 #define PREFIX_OWNER 0x10
extern void sendto_channelprefix_butone(aClient *one, aClient *from, aChannel *chptr, extern void sendto_channelprefix_butone(aClient *one, aClient *from, aChannel *chptr,
int prefix, char *pattern, ...) __attribute__((format(printf,5,6))); int prefix, char *pattern, ...) __attribute__((format(printf,5,6)));
extern void sendto_channelprefix_butone_tok(aClient *one, aClient *from, aChannel *chptr,
int prefix, char *cmd, char *tok, char *nick, char *text, char do_send_check);
extern void sendto_channel_butone(aClient *, aClient *, aChannel *, extern void sendto_channel_butone(aClient *, aClient *, aChannel *,
char *, ...) __attribute__((format(printf,4,5))); char *, ...) __attribute__((format(printf,4,5)));
extern void sendto_channel_butserv_butone(aChannel *chptr, aClient *from, aClient *one, extern void sendto_channel_butserv_butone(aChannel *chptr, aClient *from, aClient *one,
-81
View File
@@ -366,87 +366,6 @@ void sendto_channelprefix_butone(aClient *one, aClient *from, aChannel *chptr,
return; return;
} }
void sendto_channelprefix_butone_tok(aClient *one, aClient *from, aChannel *chptr,
int prefix,
char *cmd, char *tok, char *nick, char *text, char do_send_check)
{
Member *lp;
aClient *acptr;
int i;
char is_ctcp = 0;
unsigned int tlen, clen, xlen, wlen = 0;
char *p;
/* For servers with token capability */
p = ircsprintf(tcmd, ":%s %s %s :%s", from->name, tok, nick, text);
tlen = (int)(p - tcmd);
ADD_CRLF(tcmd, tlen);
/* For dumb servers without tokens */
p = ircsprintf(ccmd, ":%s %s %s :%s", from->name, cmd, nick, text);
clen = (int)(p - ccmd);
ADD_CRLF(ccmd, clen);
/* For our users... */
if (IsPerson(from))
p = ircsprintf(xcmd, ":%s!%s@%s %s %s :%s",
from->name, from->user->username, GetHost(from), cmd, nick, text);
else
p = ircsprintf(xcmd, ":%s %s %s :%s", from->name, cmd, nick, text);
xlen = (int)(p - xcmd);
ADD_CRLF(xcmd, xlen);
if (do_send_check && *text == 1 && myncmp(text+1,"ACTION ",7) && myncmp(text+1,"DCC ",4))
is_ctcp = 1;
++current_serial;
for (lp = chptr->members; lp; lp = lp->next)
{
acptr = lp->cptr;
if (acptr->from == one)
continue; /* ...was the one I should skip
or user not not a channel op */
if (prefix == PREFIX_ALL)
goto good;
if ((prefix & PREFIX_HALFOP) && (lp->flags & CHFL_HALFOP))
goto good;
if ((prefix & PREFIX_VOICE) && (lp->flags & CHFL_VOICE))
goto good;
if ((prefix & PREFIX_OP) && (lp->flags & CHFL_CHANOP))
goto good;
#ifdef PREFIX_AQ
if ((prefix & PREFIX_ADMIN) && (lp->flags & CHFL_CHANPROT))
goto good;
if ((prefix & PREFIX_OWNER) && (lp->flags & CHFL_CHANOWNER))
goto good;
#endif
continue;
good:
if (IsDeaf(acptr) && !sendanyways)
continue;
if (MyConnect(acptr) && IsRegisteredUser(acptr))
{
if (IsNoCTCP(acptr) && !IsOper(from) && is_ctcp)
continue;
sendbufto_one(acptr, xcmd, xlen);
}
else
{
/* Now check whether a message has been sent to this
* remote link already */
if (acptr->from->serial != current_serial)
{
sendbufto_one(acptr, ccmd, clen);
acptr->from->serial = current_serial;
}
}
}
return;
}
/* weird channelmode +mu crap: /* weird channelmode +mu crap:
* - local: deliver msgs to chanops (and higher) like <IRC> SrcNick: hi all * - local: deliver msgs to chanops (and higher) like <IRC> SrcNick: hi all
* - remote: deliver msgs to every server once (if needed) with real sourcenick. * - remote: deliver msgs to every server once (if needed) with real sourcenick.