]> jfr.im git - irc/evilnet/x3.git/commitdiff
Brought irc_mark() into line with Nefarious 2 features
authorMatthew Beeching <redacted>
Sat, 22 Mar 2014 21:54:07 +0000 (21:54 +0000)
committerMatthew Beeching <redacted>
Sat, 22 Mar 2014 21:54:07 +0000 (21:54 +0000)
src/proto-p10.c
x3.conf.example

index 28a53f4d1612632858f0267ec7a873c1b4c30322..946e921aae458cc7b58abdc254ffb69e34d95f8f 100644 (file)
@@ -1181,11 +1181,25 @@ void
 irc_mark(struct userNode *user, char *mark)
 {
     char *host = user->hostname;
+    int type = 4;
+    const char *tstr = NULL;
 
     /* TODO: Allow mark overwrite. If they are marked, and their fakehost is oldmark.hostname, update it to newmark.hostname so mark can be called multiple times. Probably requires ircd modification also */
     if(user->mark)
         return;
 
+    tstr = conf_get_data("server/type", RECDB_QSTRING);
+    if(tstr)
+        type = atoi(tstr);
+    else
+        type = 4;
+
+    if (type >= 9)
+    {
+        putsock("%s " CMD_MARK " %s MARK %s", self->numeric, user->nick, mark);
+        return;
+    }
+
     /* if the mark will put us over the  host length, clip some off the left hand side
      * to make room...
      */
index 93858026f8f99a00b5d3ce3d18ed18712311cf35..5061c794a67f2a8188d82c54a16c97b487df7386 100644 (file)
@@ -57,8 +57,9 @@
      * 4 - nefarious 0.4.x and other ircds
      * 5 - nefarious 1.0.x and higher (Obselete)
      * 6 - nefarious 1.1.0 and higher (Obselete)
-     * 7 - nefarious 1.2.0 and higher (Branch Revsion)
-     * 8 - nefarious 1.3.0 and higher (Trunk Revsions)
+     * 7 - nefarious 1.2.0 and higher (Obselete)
+     * 8 - nefarious 1.3.0 and higher (Legacy Version)
+     * 9 - nefarious 2.0.x and higher (Current Version)
      */
     "type" "8";
     "host_in_topic" "1"; //Set to 1 if your Nefarious server have the HOST_IN_TOPIC F:line set to TRUE.