eggheads / eggdrop

The Eggdrop IRC Bot
GNU General Public License v2.0
508 stars 84 forks source link

Fix .channel formatting #1679

Open michaelortmann opened 3 months ago

michaelortmann commented 3 months ago

Found by: vanosg Patch by: michaelortmann Fixes: #1672

One-line summary: Fix .channel formatting

Additional description (if needed):

Test cases demonstrating functionality (if applicable): 1. .channel Before:

Channel #test, 2 members, mode +tn:
(n = owner, m = master, o = op, d = deop, b = bot)
 NICKNAME  HANDLE    ACCOUNT    JOIN   IDLE         USER@HOST
 BotA      *         *         BotA!~eggdrop@localhost               <- it's me!
 testuser  testuser  *         testuser!~michael@localhost N             ~michael@localhost
End of channel info.

After:

Channel #test, 2 members, mode +tn:
(n = owner, m = master, o = op, d = deop, b = bot)
 NICKNAME HANDLE   ACCOUNT JOIN   F IDLE         USER@HOST
 BotA     *        *       15:10                 ~eggdrop@localhost <- it's me!
 testuser testuser *       *      N              ~michael@localhost
End of channel info.

2. .help channel: Before:

[...]
      <D|Ares>  NICKNAME  HANDLE     JOIN  IDLE  USER@HOST
      <D|Ares> @Wcc       Wcc        ---  N      Wcc@blah.atlaga.adelphia.net

   The "@Wcc" means that the user's nickname is Wcc and that he is a chanop.
   The second "Wcc" is the user's handle. Sometimes this will differ from the
   nickname a person is using. The time displayed is the time the user joined
   the channel. The next field is the user's status flag. These are the same
   as the flags listed in .help whois. Global flags are uppercase. Only
   the 'highest' flag is displayed.

   The last two fields are the user's idle time, and the user@host they are
   connecting from
[...]

After:

[...]
       NICKNAME HANDLE ACCOUNT JOIN   F IDLE         USER@HOST
      @Wcc      Wcc    *       00:42  N              Wcc@example.org

   The "@Wcc" means that the user's nickname is Wcc and that he is a chanop.
   The second "Wcc" is the user's handle. Sometimes this will differ from the
   nickname a person is using. The time displayed is the time the user joined
   the channel. The next field is the user's status flag. These are the same
   as the flags listed in .help whois. Global flags are uppercase. Only
   the 'highest' flag is displayed. The last two fields are the user's idle
   time (if more than 3 minutes), and the user@host they are connecting from.

   IDLE could display "(away)" as last away status known to the bot. It could
   be out of sync, if not tracked via away-notify capability or otherwise.
[...]