@@ -4,6 +4,7 @@
* Bots now share channel key to other bots even if not opped.
* Fix rare issue with writing binary config.
* Make ./wraith -q and -Q clearly exit when already written.
+ * Don't crash when looking up a missing response.
# 1.4.9
* Fix various compile warnings and spam
@@ -25,6 +25,8 @@ init_responses()
const char *
response(response_t type)
{
+ if (!res_map.contains(type))
+ return type;
return res_map[type].at(randint(res_map[type].size()));
}
/* vim: set sts=2 sw=2 ts=8 et: */