channel_join(client_map[args[1]], args[2], true)
end
function commands.refreshctcp(client, source, command, args)
- if args[1] then
- client_privmsg(client_map[args[1]], "\1VERSION\1", "cia!cia@cia.gov")
- client_privmsg(client_map[args[1]], "\1TIME\1", "cia!cia@cia.gov")
+ local flags = args[2] and tonumber(args[2]) or 3
+ if args[1] and args[1] ~= "*" then
+ if flags&1 ~= 0 then client_privmsg(client_map[args[1]], "\1VERSION\1", "cia!cia@cia.gov") end
+ if flags&2 ~= 0 then client_privmsg(client_map[args[1]], "\1TIME\1", "cia!cia@cia.gov") end
else
for k, v in pairs(client_map) do
- client_privmsg(v, "\1VERSION\1", "cia!cia@cia.gov")
- client_privmsg(v, "\1TIME\1", "cia!cia@cia.gov")
+ if flags&1 ~= 0 then client_privmsg(v, "\1VERSION\1", "cia!cia@cia.gov") end
+ if flags&2 ~= 0 then client_privmsg(v, "\1TIME\1", "cia!cia@cia.gov") end
end
end
end