Skip to content

msgcmds.c.diff

wilk edited this page Sep 14, 2022 · 1 revision

msgcmds.c

This is a modification for stats.mod (1.3.3) for Eggdrop.

Changes:

  • allows detecting https:// links and prevents from adding http:// to them
@@ -261,4 +261 @@
-  if (strncasecmp(rest, "http://", 7)) {
-    url = nmalloc(7 + strlen(rest) + 1);
-    sprintf(url, "http://%s", rest);
-  } else {
+  if (!strncasecmp(rest, "http://", 7) || !strncasecmp(rest, "https://", 8)) {
@@ -266,0 +264,3 @@
+  } else {
+    url = nmalloc(7 + strlen(rest) + 1);
+    sprintf(url, "http://%s", rest);

Clone this wiki locally