aboutsummaryrefslogtreecommitdiff
path: root/irc
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2006-12-30 21:25:22 +0000
committerMartin Wilke <miwi@FreeBSD.org>2006-12-30 21:25:22 +0000
commit5d38e8aace46211f02ef38bf6984be5f66734ce8 (patch)
tree50be48459e9a60f7cad0d790a54e1647e59175fe /irc
parent4f1655130df42dd63fd30d8af9d4dbabae8cf09d (diff)
downloadports-5d38e8aace46211f02ef38bf6984be5f66734ce8.tar.gz
ports-5d38e8aace46211f02ef38bf6984be5f66734ce8.zip
Notes
Diffstat (limited to 'irc')
-rw-r--r--irc/ircd-ru/files/patch-ircsprintf.h13
-rw-r--r--irc/ircd-ru/files/patch-m_who.c131
2 files changed, 144 insertions, 0 deletions
diff --git a/irc/ircd-ru/files/patch-ircsprintf.h b/irc/ircd-ru/files/patch-ircsprintf.h
new file mode 100644
index 000000000000..763500318270
--- /dev/null
+++ b/irc/ircd-ru/files/patch-ircsprintf.h
@@ -0,0 +1,13 @@
+--- include/ircsprintf.h.orig Wed Dec 27 21:28:44 2006
++++ include/ircsprintf.h Wed Dec 27 21:29:34 2006
+@@ -3,6 +3,10 @@
+ #include <stdarg.h>
+ #include <stdio.h>
+
++#ifndef va_copy
++#define va_copy(a1, a2) (a1) = (a2)
++#endif
++
+ /* define this if you intend to use ircsnprintf or ircvsnprintf */
+ /* It's not used, and sNprintf functions are not in all libraries */
+ #define WANT_SNPRINTF
diff --git a/irc/ircd-ru/files/patch-m_who.c b/irc/ircd-ru/files/patch-m_who.c
new file mode 100644
index 000000000000..7fdfc67c4fb0
--- /dev/null
+++ b/irc/ircd-ru/files/patch-m_who.c
@@ -0,0 +1,131 @@
+--- src/m_who.c.orig Fri Jul 14 18:37:05 2006
++++ src/m_who.c Wed Dec 27 21:22:01 2006
+@@ -33,6 +33,14 @@
+ #include <fcntl.h>
+ #include "h.h"
+
++#if defined(RESTRICT_WHO)
++#define ISADMIN(arg) IsOAdmin(arg)
++#define ISOPER(arg) IsOper(arg)
++#else
++#define ISADMIN(arg) IsAdmin(arg)
++#define ISOPER(arg) IsAnOper(arg)
++#endif
++
+ /* Internally defined stuffs */
+ SOpts wsopts;
+ int build_searchopts(aClient *, int, char **);
+@@ -437,13 +445,7 @@
+
+ if(cptr->user->channel)
+ {
+- if(
+-#if defined(RESTRICT_WHO)
+- IsOAdmin(
+-#else
+- IsAdmin(
+-#endif
+- sptr))
++ if(ISADMIN(sptr))
+ {
+ chptr = cptr->user->channel->value.chptr;
+ if(!(ShowChannel(sptr, chptr)))
+@@ -479,13 +481,7 @@
+ aClient *ac;
+ chanMember *cm;
+ Link *lp;
+- int shown=0, i=0, showall=
+-#if defined(RESTRICT_WHO)
+- IsOper(
+-#else
+- IsAnOper(
+-#endif
+- sptr);
++ int shown=0, i=0, showall = ISOPER(sptr);
+ char status[4];
+
+ /* drop nonlocal clients */
+@@ -527,21 +523,9 @@
+ {
+ if(IsMember(sptr,wsopts.channel))
+ showall=1;
+- else if(SecretChannel(wsopts.channel) &&
+-#if defined(RESTRICT_WHO)
+- IsOAdmin(
+-#else
+- IsAdmin(
+-#endif
+- sptr))
++ else if(SecretChannel(wsopts.channel) && ISADMIN(sptr))
+ showall=1;
+- else if(!SecretChannel(wsopts.channel) &&
+-#if defined(RESTRICT_WHO)
+- IsOper(
+-#else
+- IsAnOper(
+-#endif
+- sptr))
++ else if(!SecretChannel(wsopts.channel) && ISOPER(sptr))
+ showall=1;
+ else
+ showall=0;
+@@ -561,13 +545,7 @@
+ #ifdef NOTHELPER_HIDEOPERATOR
+ && (IsUmodeh(ac) || IsAnOper(sptr))
+ #endif
+- ? '*' : ((IsInvisible(ac) &&
+-#if defined(RESTRICT_WHO)
+- IsOper(
+-#else
+- IsAnOper(
+-#endif
+- sptr)) ?
++ ? '*' : ((IsInvisible(ac) && ISOPER(sptr)) ?
+ '%' : 0));
+ status[((status[i]) ? ++i : i)]=((cm->flags&CHFL_CHANOP) ? '@'
+ : ((cm->flags&CHFL_VOICE) ?
+@@ -604,13 +582,7 @@
+ #ifdef NOTHELPER_HIDEOPERATOR
+ && (IsUmodeh(ac) || IsAnOper(sptr))
+ #endif
+- ? '*' : (IsInvisible(ac) &&
+-#if defined(RESTRICT_WHO)
+- IsOper(
+-#else
+- IsAnOper(
+-#endif
+- sptr) ?
++ ? '*' : (IsInvisible(ac) && ISOPER(sptr) ?
+ '%' : 0));
+ status[2]=0;
+ sendto_one(sptr, getreply(RPL_WHOREPLY), me.name, sptr->name,
+@@ -658,13 +630,7 @@
+ #ifdef NOTHELPER_HIDEOPERATOR
+ && (IsUmodeh(ac) || IsAnOper(sptr))
+ #endif
+- ? '*' : ((IsInvisible(ac) &&
+-#if defined(RESTRICT_WHO)
+- IsOper(
+-#else
+- IsAnOper(
+-#endif
+- sptr)) ?
++ ? '*' : ((IsInvisible(ac) && ISOPER(sptr)) ?
+ '%' : 0));
+ status[((status[i]) ? ++i : i)]=((cm->flags&CHFL_CHANOP) ?
+ '@' : ((cm->flags&CHFL_VOICE)
+@@ -697,13 +663,7 @@
+ #ifdef NOTHELPER_HIDEOPERATOR
+ && (IsUmodeh(ac) || IsAnOper(sptr))
+ #endif
+- ? '*' : (IsInvisible(ac) &&
+-#if defined(RESTRICT_WHO)
+- IsOper(
+-#else
+- IsAnOper(
+-#endif
+- sptr) ?
++ ? '*' : (IsInvisible(ac) && ISOPER(sptr) ?
+ '%' : 0));
+ status[2]=0;
+ sendto_one(sptr, getreply(RPL_WHOREPLY), me.name, sptr->name,