static void chatfn_help(void);
+void chatfn_quit(void) __WEAK;
+void chatfn_quit(void)
+{
+ VB_LOG(CRIT,"chatfn_quit() not initialized");
+}
+
static const struct chat_cmdtab chat_cmdint[]={
{"help" ,0,chatfn_help ,"This help"},
-#if 0
{"quit" ,0,chatfn_quit ,"Close connection"},
{"exit" ,0,chatfn_quit ,"Close connection"},
-#endif
};
+const struct chat_cmdtab chat_cmdtable[] __WEAK =
+ {{NULL,0,NULL,NULL}};
+
static void chatfn_help(void)
{
int i;
}
chat_parsepars(s);
cmdt=chat_cmdtable;
+ if (!cmdt || !cmdt->name) {
+ VB_LOG(CRIT,"chat_cmdtable not initialized, \"%s\" tried to execute \"%s\"",who,cmds);
+ return;
+ }
for (i=0;i<NELEM(chat_cmdint);) {
if (cmdt->name) cmd=cmdt++;
else cmd=&chat_cmdint[i++];