Browse files

Indent

  • Loading branch information...
1 parent 68d4919 commit 91e0054f59fee9c851e3c5577624dc920acbcac2 Crab Qiu committed Jun 11, 2012
Showing with 20 additions and 20 deletions.
  1. +20 −20 lib/Net/IRC/Bot.pm
View
40 lib/Net/IRC/Bot.pm
@@ -45,25 +45,26 @@ class Net::IRC::Bot {
}
method !connect(){
- #Establish connection to server
- self!resetstate;
- say "Connecting to $.server on port $.port";
- $conn = IO::Socket::INET.new(host => $.server, port => $.port)
- but role {
- method sendln(Str $string) {
- self.send($string~"\c13\c10")
- }
- };
-
- #Send PASS if needed
- $conn.sendln("PASS $.password") if $.password;
-
- #Send NICK & USER.
- #If the nick collides, we'll resend a new one when we recieve the error later.
- #USER Parameters: <username> <hostname> <servername> <realname>
- $conn.sendln("NICK $.nick");
- $conn.sendln("USER $.username abc.xyz.net $.server :$.realname");
- %state<connected> = True;
+ #Establish connection to server
+ self!resetstate;
+ say "Connecting to $.server on port $.port";
+ $conn = IO::Socket::INET.new(host => $.server, port => $.port)
+ but role {
+ method sendln(Str $string) {
+ self.send($string~"\c13\c10")
+ }
+ };
+
+ # Send PASS if needed
+ $conn.sendln("PASS $.password") if $.password;
+
+ # Send NICK & USER.
+ # If the nick collides, we'll resend a new one when we recieve
+ # the error later.
+ # USER Parameters: <username> <hostname> <servername> <realname>
+ $conn.sendln("NICK $.nick");
+ $conn.sendln("USER $.username abc.xyz.net $.server :$.realname");
+ %state<connected> = True;
}
method !disconnect($quitmsg = "Leaving") {
@@ -73,7 +74,6 @@ class Net::IRC::Bot {
}
}
-
method run() {
self!disconnect;
self!connect;

0 comments on commit 91e0054

Please sign in to comment.