Fix registered channel desync; fix HelpServ crash for old cfg files
[srvx.git] / src / mod-helpserv.c
index 14120215546a5ae173a98c9d44cebb355ecf5798..126d0a247975af468a454e262eb59eb4024c157e 100644 (file)
@@ -958,7 +958,7 @@ static struct helpserv_request * create_request(struct userNode *user, struct he
     else
         send_message_type(4, user, hs->helpserv, "%s %s %s", lbuf[0], lbuf[1], lbuf[2]);
 
-    if (hs->req_on_join && req == hs->unhandled && hs->helpchan_empty) {
+    if (hs->req_on_join && req == hs->unhandled && hs->helpchan_empty && !user->uplink->burst) {
         timeq_del(0, run_empty_interval, hs, TIMEQ_IGNORE_WHEN);
         run_empty_interval(hs);
     }
@@ -1904,8 +1904,6 @@ static HELPSERV_FUNC(cmd_show) {
 
     REQUIRE_PARMS(2);
 
-    assert(hs_user);
-
     if (!(req = smart_get_request(hs, hs_user, argv[1], &num_requests))) {
         helpserv_notice(user, "HSMSG_REQ_INVALID", argv[1]);
         return 0;
@@ -1990,8 +1988,6 @@ static HELPSERV_FUNC(cmd_addnote) {
 
     REQUIRE_PARMS(3);
 
-    assert(hs_user);
-
     if (!(req = smart_get_request(hs, hs_user, argv[1], &num_requests))) {
         helpserv_notice(user, "HSMSG_REQ_INVALID", argv[1]);
         return 0;
@@ -3652,7 +3648,7 @@ static void helpserv_conf_read(void) {
     helpserv_conf.db_backup_frequency = str ? ParseInterval(str) : 7200;
 
     str = database_get_data(conf_node, "description", RECDB_QSTRING);
-    helpserv_conf.description = str;
+    helpserv_conf.description = str ? str : "Help Queue Manager";
 
     str = database_get_data(conf_node, "reqlogfile", RECDB_QSTRING);
     if (str && strlen(str))