X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/569587404da2a897f15e6b0d4bd64e8fbe5617c4..63c95a478af1b51ad021abef19f630de189f0229:/src/proto-p10.c diff --git a/src/proto-p10.c b/src/proto-p10.c index 7d17423..333ec57 100644 --- a/src/proto-p10.c +++ b/src/proto-p10.c @@ -925,12 +925,15 @@ irc_topic(struct userNode *service, struct userNode *who, struct chanNode *what, int type = 4; const char *str; str = conf_get_data("server/type", RECDB_QSTRING); - type = atoi(str); + if(str) + type = atoi(str); + else + type = 4;/* default to 040 style topics */ if (type == 5) { putsock("%s " P10_TOPIC " %s %s " FMT_TIME_T " " FMT_TIME_T " :%s", service->numeric, what->name, who->nick, what->timestamp, now, topic); } else { - who = service; /* REMOVE LINE FOR NEFARIOUS 0.5.0 */ + who = service; putsock("%s " P10_TOPIC " %s :%s", who->numeric, what->name, topic); } }