root/Scripts/branches/0180_TM_ENHANCE_MUDBOT_QUESTING/Lua/experiments/mudbot/services/serverServ.lua @ 3503

Revision 3503, 0.8 KB (checked in by trichards, 6 months ago)

Adding IRC services compatible with Hybrid IRC to mudbot.

Line 
1
2
3local serverServ = 
4{
5    commands = {}   
6}
7
8serverServ.commands["SERVER"] =
9{
10       
11    -- If hub is identifying itself:
12    --  words[1] = "SERVER"
13    --  words[2] = server name
14    --  words[3] = hop count
15    --  words[4] = description
16    handler = function(connection, words)
17        -- TODO Get configuration from N line
18        -- N:services.indiezen.net:Hybrid services
19        bot.servicesName = "services.indiezen.net";
20        bot.servicesInfo = "Hybrid services"
21        connection:send(":" .. words[2] .. " SERVER " .. bot.servicesName .. " 1 :" .. bot.servicesInfo);
22       
23    end
24}
25
26serverServ.commands["PING"] =
27{
28    handler = function(connection, words)
29        connection:send("PONG :indiezen")
30    end
31}
32
33
34ircServices["ServerServ"] = serverServ;
Note: See TracBrowser for help on using the browser.