[wiki] [sites] Remove prefix from sic patches || sin

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

commit 56d816c0960f7b655e78f3b10eab1a1e6b5790a9
Author: sin <sin_AT_2f30.org>
Date: Wed Apr 29 13:35:30 2015 +0200

    Remove prefix from sic patches

diff --git a/tools.suckless.org/sic/patches/hidecommand.diff b/tools.suckless.org/sic/patches/hidecommand.diff
new file mode 100644
index 0000000..3f20f05
--- /dev/null
+++ b/tools.suckless.org/sic/patches/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/hidecommand.md b/tools.suckless.org/sic/patches/hidecommand.md
new file mode 100644
index 0000000..14d741c
--- /dev/null
+++ b/tools.suckless.org/sic/patches/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](hidecommand.diff)
+
diff --git a/tools.suckless.org/sic/patches/index.md b/tools.suckless.org/sic/patches/index.md
deleted file mode 100644
index 77a57ae..0000000
--- a/tools.suckless.org/sic/patches/index.md
+++ /dev/null
_AT_@ -1,29 +0,0 @@
-Patches
-=======
-
-diff generation
----------------
-For git users:
-
- cd sic-directory
- git diff > sic-X.Y-yourpatchname.diff
-
-For tarballs:
-
- cd modified-sic-directory/..
- diff -up original-sic-directory modified-sic-directory > sic-X.Y-yourpatchname.diff
-
-where `X.Y` is an sic tag name or version number.
-
-
-patch application
------------------
-For git users:
-
- cd sic-directory
- git apply path/to/patch.diff
-
-For tarballs:
-
- cd sic-directory
- patch -p1 < path/to/patch.diff
diff --git a/tools.suckless.org/sic/patches/sic-hidecommand.diff b/tools.suckless.org/sic/patches/sic-hidecommand.diff
deleted file mode 100644
index 3f20f05..0000000
--- a/tools.suckless.org/sic/patches/sic-hidecommand.diff
+++ /dev/null
_AT_@ -1,30 +0,0 @@
---- 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
deleted file mode 100644
index d0277ab..0000000
--- a/tools.suckless.org/sic/patches/sic-hidecommand.md
+++ /dev/null
_AT_@ -1,21 +0,0 @@
-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:35:36 CEST

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