]> git.lizzy.rs Git - luairc.git/commitdiff
Move channel and network definitions to the top so people can see them
authorShawn M Moore <sartak@gmail.com>
Wed, 12 Sep 2007 03:39:13 +0000 (22:39 -0500)
committerShawn M Moore <sartak@gmail.com>
Wed, 12 Sep 2007 03:39:13 +0000 (22:39 -0500)
test/luabot.lua

index 6d943509476ca569a1deae12a5098317116105a0..4563c49cc249e701493e02b392bc62af28533fd0 100644 (file)
@@ -4,6 +4,8 @@ local irc = require 'irc'
 irc.DEBUG = true
 
 local nick = "luabot"
+local channel = "#doytest"
+local network = "irc.freenode.org"
 
 local envs = {}
 
@@ -77,7 +79,7 @@ local commands = {
 }
 
 irc.register_callback("connect", function()
-    irc.join("#doytest")
+    irc.join(channel)
 end)
 
 irc.register_callback("channel_msg", function(channel, from, message)
@@ -107,4 +109,4 @@ irc.register_callback("nick_change", function(from, old_nick)
     end
 end)
 
-irc.connect{network = "irc.freenode.net", nick = nick}
+irc.connect{network = network, nick = nick}