Commit 7023369c authored by rswindell's avatar rswindell

Added support for a new "user event": local/sysop chat

If an external progarm is configured (in SCFG->External Progarms) is configured
to "execute on event" set to "Local/Sysop Chat", then that program will be
executed when the remote user is "pulled" into sysop-chat (e.g. via F10 key in
sbbsctrl) rather than running the normal built-in chat.
parent c3614826
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2013 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -857,6 +857,12 @@ void sbbs_t::privchat(bool local)
if(!online || sys_status&SS_ABORT)
return;
if(local) {
/* If an external sysop chat event handler is installed, just run that and do nothing else */
if(user_event(EVENT_LOCAL_CHAT))
return;
}
if(((sys_status&SS_USERON && useron.chat&CHAT_SPLITP) || !(sys_status&SS_USERON))
&& term_supports(ANSI) && rows>=24 && cols>=80)
sys_status|=SS_SPLITP;
......
......@@ -356,6 +356,7 @@ typedef enum { /* Values for xtrn_t.event */
,EVENT_POST /* Execute after posting a message */
,EVENT_UPLOAD /* Execute after uploading a file */
,EVENT_DOWNLOAD /* Execute after downloading a file */
,EVENT_LOCAL_CHAT /* Execute upon local/sysop chat */
} user_event_t;
/* Misc bits for event_t.misc */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment