From a9ce94de9b557f7fc6dfeeb28e6a573423236491 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 19 May 2013 20:59:29 +0000 Subject: [PATCH] - Remove sendto_channelprefix_butone_tok(). --- include/h.h | 2 -- src/send.c | 81 ----------------------------------------------------- 2 files changed, 83 deletions(-) diff --git a/include/h.h b/include/h.h index e3e02e69b..f56610c4a 100644 --- a/include/h.h +++ b/include/h.h @@ -267,8 +267,6 @@ extern void sendto_message_one(aClient *to, aClient *from, char *sender, #define PREFIX_OWNER 0x10 extern void sendto_channelprefix_butone(aClient *one, aClient *from, aChannel *chptr, 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 *, char *, ...) __attribute__((format(printf,4,5))); extern void sendto_channel_butserv_butone(aChannel *chptr, aClient *from, aClient *one, diff --git a/src/send.c b/src/send.c index 7da1fab20..bb73b5b6a 100644 --- a/src/send.c +++ b/src/send.c @@ -366,87 +366,6 @@ void sendto_channelprefix_butone(aClient *one, aClient *from, aChannel *chptr, 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: * - local: deliver msgs to chanops (and higher) like SrcNick: hi all * - remote: deliver msgs to every server once (if needed) with real sourcenick.