[wiki] [sites] ho1ocr0n's sic patch || ho1ocr0n

From: <git_AT_suckless.org>
Date: Wed, 29 Apr 2015 13:13:27 +0200

commit 491d4f4f0d4c6a0519077013ecf4c1a472b9f727
Author: ho1ocr0n <ho1ocr0n_AT_/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
_AT_@ -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
+_AT_@ -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;
+
+_AT_@ -99,6 +100,9 @@
+ case 's':
+ strlcpy(channel, p, sizeof channel);
+ return;
++ case 'h':
++ strlcpy(hidecmd, p, sizeof hidecmd);
++ return;
+ }
+ }
+ sout("%s", s);
+_AT_@ -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
_AT_@ -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)
+
Received on Wed Apr 29 2015 - 13:13:27 CEST

This archive was generated by hypermail 2.3.0 : Thu Jun 18 2015 - 17:40:18 CEST