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

    ho1ocr0n's sic patch

diff --git a/tools.suckless.org/sic/patches/sic-hidecommand.diff 
b/tools.suckless.org/sic/patches/sic-hidecommand.diff
new file mode 100644
index 0000000..3f20f05
--- /dev/null
+++ 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
new file mode 100644
index 0000000..d0277ab
--- /dev/null
+++ 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)
+


Reply via email to