From: Matthew Beeching Date: Sat, 22 Mar 2014 21:54:07 +0000 (+0000) Subject: Brought irc_mark() into line with Nefarious 2 features X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/commitdiff_plain/b66855e2e4a9f73738a819eae10450a087978d1a Brought irc_mark() into line with Nefarious 2 features --- diff --git a/src/proto-p10.c b/src/proto-p10.c index 28a53f4..946e921 100644 --- a/src/proto-p10.c +++ b/src/proto-p10.c @@ -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... */ diff --git a/x3.conf.example b/x3.conf.example index 9385802..5061c79 100644 --- a/x3.conf.example +++ b/x3.conf.example @@ -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.