Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/ruby
- # this is the main part of CoyoBOT
- require_relative "./IRCSocket"
- # setting constants for testing purposes
- SERVER = "irc.freenode.net" # server hostname to connect to
- PORT = 6667 # port number to connect to
- NICKNAME = "coyobot" # nickname
- USERNAME = "unf" # username
- GECOS = "Coyo's Bot" # "real name"
- PASSWORD = "pass" # server password
- MODES = "+iswx" # usermodes to set on connection
- # main method
- def main
- s = IRCSocket.new SERVER, PORT, NICKNAME, USERNAME, GECOS, PASSWORD
- # instantiate new IRC socket connection
- s.mode NICKNAME MODES
- s.join "#bots"
- s.msg "#bots", "Hello world!"
- # aaaand, now what?
- # I'm trying to output the puts from s but I dont know how. Halp!
- end
- # Thank you so much in advance, I really appreciate it!
Add Comment
Please, Sign In to add comment