mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
send2irc Multi-Host upgrade
Allows for send2irc to send to multiple hosts.
This commit is contained in:
@@ -135,7 +135,7 @@
|
||||
var/comms_password = ""
|
||||
|
||||
var/use_irc_bot = 0
|
||||
var/irc_bot_host = ""
|
||||
var/list/irc_bot_host = list()
|
||||
var/main_irc = ""
|
||||
var/admin_irc = ""
|
||||
var/python_path = "" //Path to the python executable. Defaults to "python" on windows and "/usr/bin/env python2" on unix
|
||||
@@ -458,7 +458,7 @@
|
||||
config.comms_password = value
|
||||
|
||||
if("irc_bot_host")
|
||||
config.irc_bot_host = value
|
||||
config.irc_bot_host = text2list(value, ";")
|
||||
|
||||
if("main_irc")
|
||||
config.main_irc = value
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/proc/send2irc(var/channel, var/msg)
|
||||
if(config.use_irc_bot && config.irc_bot_host)
|
||||
spawn(0)
|
||||
ext_python("ircbot_message.py", "[config.comms_password] [config.irc_bot_host] [channel] [msg]")
|
||||
if(config.use_irc_bot && config.irc_bot_host.len)
|
||||
for(var/IP in config.irc_bot_host)
|
||||
spawn(0)
|
||||
ext_python("ircbot_message.py", "[config.comms_password] [IP] [channel] [msg]")
|
||||
return
|
||||
|
||||
/proc/send2mainirc(var/msg)
|
||||
|
||||
Reference in New Issue
Block a user