mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Adds a C library alternative to the ircbot nudge script.
This allows for more secure and stable transmission on Linux, but you might see some improvements on Windows too. Code lies in (confusingly) lib/src. nudge.c should be compiled to lib/nudge.[dll/so] and be linked against netutil.c. There's some horribly hacky code in nudge.c to assemble pickled data, but it's probably the fastest way that's still safe. Signed-off-by: Mloc-Argent <colmohici@gmail.com>
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
/proc/send2irc(var/channel, var/msg)
|
||||
if(config.use_irc_bot && config.irc_bot_host)
|
||||
ext_python("ircbot_message.py", "[config.comms_password] [config.irc_bot_host] [channel] [msg]")
|
||||
if(config.use_lib_nudge)
|
||||
var/nudge_lib
|
||||
if(world.system_type == MS_WINDOWS)
|
||||
nudge_lib = "lib\\nudge.dll"
|
||||
else
|
||||
nudge_lib = "lib/nudge.so"
|
||||
|
||||
call(nudge_lib, "nudge")("[config.comms_password]","[config.irc_bot_host]","[channel]","[msg]")
|
||||
else
|
||||
ext_python("ircbot_message.py", "[config.comms_password] [config.irc_bot_host] [channel] [msg]")
|
||||
return
|
||||
|
||||
/proc/send2mainirc(var/msg)
|
||||
|
||||
Reference in New Issue
Block a user