sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 491d4f4f0d4c6a0519077013ecf4c1a472b9f727
parent 691dbb07591a2676201df840248e9f2a40d2665f
Author: ho1ocr0n <ho1ocr0n@/dev/null>
Date:   Wed, 29 Apr 2015 06:12:02 -0500

ho1ocr0n's sic patch

Diffstat:
Atools.suckless.org/sic/patches/sic-hidecommand.diff | 30++++++++++++++++++++++++++++++
Atools.suckless.org/sic/patches/sic-hidecommand.md | 21+++++++++++++++++++++
2 files changed, 51 insertions(+), 0 deletions(-)

diff --git a/tools.suckless.org/sic/patches/sic-hidecommand.diff b/tools.suckless.org/sic/patches/sic-hidecommand.diff @@ -0,0 +1,30 @@ +--- sic.c.orig 2015-04-28 17:21:30.965869283 -0500 ++++ sic.c 2015-04-28 17:34:40.024754949 -0500 +@@ -19,6 +19,7 @@ + static char bufin[4096]; + static char bufout[4096]; + static char channel[256]; ++static char hidecmd[128] = {0}; + static time_t trespond; + static FILE *srv; + +@@ -99,6 +100,9 @@ + case 's': + strlcpy(channel, p, sizeof channel); + return; ++ case 'h': ++ strlcpy(hidecmd, p, sizeof hidecmd); ++ return; + } + } + sout("%s", s); +@@ -129,7 +133,8 @@ + else if(!strcmp("PING", cmd)) + sout("PONG %s", txt); + else { +- pout(usr, ">< %s (%s): %s", cmd, par, txt); ++ if (!strcasestr(hidecmd, cmd)) ++ pout(usr, ">< %s (%s): %s", cmd, par, txt); + if(!strcmp("NICK", cmd) && !strcmp(usr, nick)) + strlcpy(nick, txt, sizeof nick); + } diff --git a/tools.suckless.org/sic/patches/sic-hidecommand.md b/tools.suckless.org/sic/patches/sic-hidecommand.md @@ -0,0 +1,21 @@ +hide commands +============= + +Description +----------- + +This patch lets you hide IRC messages such as JOIN/QUIT. +You can use the sic command 'h' to specify what messages are hidden. +Example: +:h JOIN,QUIT + +Now all JOIN and QUIT messages will not be displayed. The delimiter is +unimportant (use what you like or nothing at all) + +Use the command without arguments to stop hiding any messages. + +Download +-------- + +* [patch](sic-hidecommand.diff) +