commit - c641e0473fe257a9f0836f35efc478a10af6c916
commit + 672b5ca7f0260793b40edd528432ce453acf6879
blob - 0ce4bd5a3db94af58bfa0f7f81985b8a8305c540
blob + 7018fbcb57d9c9e4484ca07927d621031aca31dd
--- .gitignore
+++ .gitignore
+.gitignore
.*~
*~
blob - cb4bacf6fae7d284f8ea0bfb11ce5c59547f0ec2
blob + 163afbaedf9d6b1507f6c36553f8dde8473848c5
--- botnow
+++ botnow
$sel->add($socket);
my $bot = {("sock" => $socket), ("name" => $network)};
push(@bots, $bot);
- putserv($bot, "NICK $nick");
- putserv($bot, "USER $nick * * :$nick");
+ IRCNOW::IO::IRC::putserv($bot, "NICK $nick");
+ IRCNOW::IO::IRC::putserv($bot, "USER $nick * * :$nick");
}
while(my @ready = $sel->can_read) {
next;
}
if ($response =~ /^PING :(.*)\r\n$/i) {
- putserv($bot, "PONG :$1");
+ IRCNOW::IO::IRC::putserv($bot, "PONG :$1");
} elsif ($response =~ /^:irc.znc.in (.*) (.*) :(.*)\r\n$/) {
my ($type, $target, $text) = ($1, $2, $3);
if ($type eq "464" && $target =~ /^$nick.?$/ && $text eq "Password required") {
- putserv($bot, "PASS $nick/$bot->{name}:$pass");
+ IRCNOW::IO::IRC::putserv($bot, "PASS $nick/$bot->{name}:$pass");
if ($bot->{name} =~ /^$localnet$/i) {
- putserv($bot, "OPER $nick $pass");
- putserv($bot, "PRIVMSG *status :LoadMod --type=user controlpanel");
- putserv($bot, "PRIVMSG *controlpanel :get Admin $nick");
- putserv($bot, "PRIVMSG *controlpanel :get Nick cloneuser");
+ IRCNOW::IO::IRC::putserv($bot, "OPER $nick $pass");
+ IRCNOW::IO::IRC::putserv($bot, "PRIVMSG *status :LoadMod --type=user controlpanel");
+ IRCNOW::IO::IRC::putserv($bot, "PRIVMSG *controlpanel :get Admin $nick");
+ IRCNOW::IO::IRC::putserv($bot, "PRIVMSG *controlpanel :get Nick cloneuser");
foreach my $chan (@teamchans) {
- putserv($bot, "JOIN $chan");
+ IRCNOW::IO::IRC::putserv($bot, "JOIN $chan");
}
}
if ($bot->{name} !~ /^$localnet$/i) {
foreach my $chan (@chans) {
- putserv($bot, "JOIN $chan");
+ IRCNOW::IO::IRC::putserv($bot, "JOIN $chan");
}
}
} elsif ($type eq "464" && $target =~ /^$nick.?$/ && $text eq "Invalid Password") {
#Unexpected bncnow.pl 454: irc.guava.ircnow.org 396 guava.guava.ircnow.org :is your displayed hostname now
} elsif ($code =~ /^464$/) { # Invalid password for oper
foreach my $chan (@teamchans) {
- putserv($bot, "PRIVMSG $chan :$nick oper password failed; the bot will be unable to view uncloaked IP addresses");
+ IRCNOW::IO::IRC::putserv($bot, "PRIVMSG $chan :$nick oper password failed; the bot will be unable to view uncloaked IP addresses");
}
} elsif ($code =~ /^477$/) { # Can't join channel
foreach my $chan (@teamchans) {
- putserv($bot, "PRIVMSG $chan :ERROR: $nick on $server: $text");
+ IRCNOW::IO::IRC::putserv($bot, "PRIVMSG $chan :ERROR: $nick on $server: $text");
}
} elsif ($code == 716 && $text =~ /^([-_\|`a-zA-Z0-9]+) :is in \+g mode \(server-side ignore.\)/) {
debug(ALL, "$text");