]> jfr.im git - irc/unrealircd/unrealircd.git/commitdiff
/who fixes again
authorluke <redacted>
Thu, 13 Jun 2002 13:21:35 +0000 (13:21 +0000)
committerluke <redacted>
Thu, 13 Jun 2002 13:21:35 +0000 (13:21 +0000)
Changes
networks/networks.ndx
src/help.c
src/s_user.c

diff --git a/Changes b/Changes
index ccf976f71bc4e48a9d4c1f755ce47e475e80d093..63611c0277fc62890c985851165b5df0a734544f 100644 (file)
--- a/Changes
+++ b/Changes
@@ -376,3 +376,13 @@ for EXEMPT_ALL and CLOAK_KEY_n. Also, changed
 version number on both that and the .network
 file, as both have changed since 3.1.3.
 --Luke
+===================================
+
+Useful /who patch incorporated, thanks to
+larne
+--Luke
+===================================
+
+More /who crackness.
+--Luke
+===================================
index 751ec95116fbc25046b4831f5add8ebb8089e1d4..e920cf0f056a4283c7205b34ceb38cd23eafa463 100644 (file)
@@ -1,59 +1,4 @@
 # Networks index file - do not touch please 
-# 54 networks listed
+# 1 network listed
 # Please report outdated entries to unreal-networks@lists.sourceforge.net
-networks/global-irc.network ......: Global-IRC (http://www.global-irc.net)
-networks/mp3fans.network .........: Mp3Fans.Net (http://www.mp3fans.net)
-networks/roxnet.network ..........: ROXnet (http://www.rox.za.net)
-networks/dragonwings.network .....: DragonWings (http://www.dragonwings.org)
-networks/megairc.network .........: MegaIRC (http://www.megairc.net)
-networks/neohorizon.network ......: NeoHorizon (http://www.nhn.net)
-networks/spynet.network ..........: SpyNet (http://www.spynet.org)
-networks/nevernet.network ........: NeverNET (http://www.nevernet.net)
-networks/altirc.network ..........: AlternativeNet IRC
-networks/bunker7.network .........: Bunker7 (http://www.bunker7.net)
-networks/realchat.network ........: RealChat.org (http://www.realchat.org)
-networks/newmilennium.network ....: NewMilennium (http://www.newmilennium.net)
-networks/solarxtreme.network .....: SolarXTreme (http://www.solarxtreme.net)
-networks/ss.network ..............: StarSpace (http://www.starspace.net)
-networks/uzaynet.network .........: UzayNet (http://www.uzaynet.nu)
-networks/infinity.network ........: Infinity-IRC.org (http://www.infinity-irc.org)
-networks/tspre.network ...........: TSpre (http://www.tspre.org)
-networks/solargalaxy.network .....: SolarGalaxy (http://www.solargalaxy.net)
-networks/digitalirc.network ......: DigitalIRC (http://www.digitalirc.net)
-networks/fireirc.network .........: FireIRC (http://www.fireirc.net)
-networks/stormdancing.network ....: StormDancing (http://www.stormdancing.net)
-networks/972-scripterz.network ...: 972-scripterz
-networks/v64net.network ..........: v64
-networks/treklink.network ........: Treklink (http://www.treklink.net)
-networks/axenet.network ..........: AXEnet
-networks/kammtech.network ........: KammTecH 
-networks/linuxactive.network .....: Linuxactive (http://www.linuxactive.net)
-networks/ircthai.network .........: IRCThai.com (http://www.ircthai.com)
-networks/chatplace.network .......: ChatPlace (http://www.chatplace.net)
-networks/interturk.network .......: InterTurk (http://www.interturk.net)
-networks/cc2.network .............: CC2 (http://www.cc2.org)
-networks/kissland.network ........: Kissland (http://www.kissland.com)
-networks/digital-irc.network .....: Digital-IRC (http://www.digital-irc.net)
-networks/seveneagle.network ......: SevenEagle.Com 
-networks/staticedge.network ......: StaticEdge
-networks/german-elite.network ....: German-Elite (http://www.german-elite.net)
-networks/thainet.network .........: Thai IRC Network
-networks/linuxsquare.network .....: LinuxSquare (http://www.linuxsquare.net)
-networks/chatstation.network .....: ChatStation
-networks/sparkhaven.network ......: SparkHaven (http://www.sparkhaven.com)
-networks/qkaka.network ...........: Qkaka (http://www.qkaka.com)
-networks/sheytoybox.network ......: SheyToyBox (http://www.sheytoybox.net)
-networks/darkfyre.network ........: Darkfyre (http://www.darkfyre.net)
-networks/israelnet.network .......: IsraelNet
-networks/tierrared.network .......: TierraRed (http://www.tierrared.com)
-networks/music-chatnet.network ...: Music-ChatNET
-networks/german-global-irc.network: German Global IRC (http://www.global-irc.de)
-networks/darkwar.network .........: Darkwar (http://www.darkwar.net)
-networks/lamenet.network .........: Lamenet (http://www.lamenet.net)
-networks/spin.network ............: SpiN
-networks/subtrexnet.network ......: Subtrex.net (http://www.subtrex.net)
-networks/data-storm.network ......: Data-Storm
-networks/tutkunet.network ........: TuTKu.Net
-networks/raptanet.network ........: RaptaNet (http://www.rapta.net)
-networks/irc-chat.network ........: IRC-Chat
-networks/auspice.network .........: auspice
\ No newline at end of file
+networks/template.netowrk .........: Template network file
index da298b916e731a1fcfe5290ed6edcfb052c2ff14..28ae6ba5dd6ed614d1e0600c6ac4b6dafbd0613a 100644 (file)
@@ -165,7 +165,6 @@ int  parse_help(sptr, name, help)
      SND(" A = Is a Server Administrator");
      SND(" N = Is a Network Administrator");
      SND(" C = Is a Co Administrator");
-/*   SND(" 1 = Is a coder");  Taken out */
      SND(" c = See's all Connects/Disconnects on local server");
      SND(" f = Listen to Flood Alerts from server");
      SND(" r = Identifies the nick as being Registered");
@@ -183,6 +182,7 @@ int  parse_help(sptr, name, help)
      SND(" t = Says that you are using a /VHOST");
      SND(" G = Filters out all Bad words in your messages with <censored>.");
      SND(" z = Marks the client as being on a Secure Connection (SSL)");
+     SND(" j = \"Junk\" mode. Displays misc information + nick changes");
      SND(" ---------------------oOo-------------------");
      SND(" -");
        }
index e91a309411d8274e68a4ba19bf526de86b949faa..17388bb818508ba999135e0ab79ea05517f0aea1 100644 (file)
@@ -2445,30 +2445,66 @@ static void do_who(sptr, acptr, repchan)
        aClient *sptr, *acptr;
        aChannel *repchan;
 {
-       char status[8];
+       char status[9];
        int  i = 0;
 
-       /* auditoriums only show @'s */
+       /* Invisible opers can only be seen by other opers */
+       if (IsHiding(acptr) && !IsOper(sptr))
+               return;
+       
+       /* auditoriums only show @'s to non opers */
        if (repchan && (repchan->mode.mode & MODE_AUDITORIUM) &&
-               !is_chan_op(acptr, repchan))
-                       return;
-                       
+           !is_chan_op(acptr, repchan) && !IsOper(sptr))
+               return;
+               
        if (acptr->user->away)
                status[i++] = 'G';
        else
                status[i++] = 'H';
+
        if (IsARegNick(acptr))
                status[i++] = 'r';
 
-       /* Check for +H here too -- codemastr */
+       /* They're an oper. Either they aren't +H, they're /whoing themselves, or sptr
+        * is also an oper.
+        */
        if (IsAnOper(acptr) && (!IsHideOper(acptr) || sptr == acptr || IsAnOper(sptr)))
                status[i++] = '*';
-       else if (IsInvisible(acptr) && sptr != acptr && IsAnOper(sptr))
-               status[i++] = '%';
+
+       /* They're an oper, +H, and sptr is an oper */
+       if (IsAnOper(acptr) && (IsHideOper(acptr) && IsAnOper(sptr)))
+               status[i++] = '!';
+
+       /* Fun check...either acptr
+        * is invisible (+i)
+        * The channel is +s or +p
+        * is +I (total invisibility) AND sptr is netadmin
+        * or not an op in an auditorium
+        * 
+        * AND
+        * they aren't /whoing themselves
+        * AND
+        * sptr is an oper
+        */
+       if ((IsInvisible(acptr) || repchan &&
+           ((repchan->mode.mode & MODE_PRIVATE) || (repchan->mode.mode & MODE_SECRET))
+           || (IsHiding(acptr) && IsNetAdmin(sptr)) || 
+           repchan && ((repchan->mode.mode & MODE_AUDITORIUM) &&
+           !is_chan_op(acptr,repchan))) && (sptr != acptr) && IsAnOper(sptr))
+               status[i++] = '&';
+
+       /* Channel operator */
        if (repchan && is_chan_op(acptr, repchan))
                status[i++] = '@';
+
+       /* Channel halfop */
+       else if (repchan && is_half_op(acptr, repchan))
+               status[i++] = '%';
+
+       /* Channel voice */
        else if (repchan && has_voice(acptr, repchan))
                status[i++] = '+';
+       
        status[i] = '\0';
        if (IsWhois(acptr) && channelwho == 0 && (acptr != sptr))
        {
@@ -2477,7 +2513,8 @@ static void do_who(sptr, acptr, repchan)
                    me.name, acptr->name, sptr->name);
        }
        if (IsHiding(acptr) && sptr != acptr && !IsNetAdmin(sptr))
-       repchan = NULL;
+               repchan = NULL;
+       
        sendto_one(sptr, rpl_str(RPL_WHOREPLY), me.name, sptr->name,
            (repchan) ? (repchan->chname) : "*", acptr->user->username,
            IsHidden(acptr) ? acptr->user->virthost : acptr->user->realhost,
@@ -2565,18 +2602,21 @@ int  m_who(cptr, sptr, parc, parv)
                chptr = find_channel(channame, NULL);
                if (chptr)
                {
-                       member = IsMember(sptr, chptr) || IsOper(sptr);
-                       if (member || !SecretChannel(chptr))
+                       if (IsMember(sptr,chptr) || IsOper(sptr) ||
+                           (!SecretChannel(chptr) && !HiddenChannel(chptr)))
                                for (lp = chptr->members; lp; lp = lp->next)
                                {
-                                       if (IsHiding(lp->value.cptr))
+                                       if (!IsOper(sptr) && IsHiding(lp->value.cptr))
+                                               continue;
+                                       if (oper && (!IsAnOper(lp->value.cptr)))
                                                continue;
-                                       if (oper && (!IsAnOper(lp->value.cptr)
-                                           ))
+                                       if (oper && IsHideOper(lp->value.cptr) &&
+                                           !IsOper(sptr))
                                                continue;
-                                       if ((lp->value.cptr != sptr
+                                       if ((lp->value.cptr != sptr)
                                            && IsInvisible(lp->value.cptr)
-                                           && !member) && !IsOper(sptr))
+                                           && !IsMember(sptr,chptr)
+                                           && !IsOper(sptr))
                                                continue;
                                        channelwho = 1;
                                        do_who(sptr, lp->value.cptr, chptr);