]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Modules/Wingate.pl
* Rebranding from blootbot to infobot
[infobot.git] / src / Modules / Wingate.pl
index 53aaf267f9a3ca4db835149b8b6de078325e133c..1c3ab1ce470f95c29626c0afb5cb93cbf8cdb0fd 100644 (file)
@@ -12,7 +12,7 @@ use strict;
 my $select = IO::Select->new;
 
 sub Wingates {
-    my $file = "$::blootbot_base_dir/$::param{'ircUser'}.wingate";
+    my $file = "$::infobot_base_dir/$::param{'ircUser'}.wingate";
     my @hosts;
 
     open(IN, $file);
@@ -72,12 +72,13 @@ sub Wingate {
        if ($wingate) {
            &::status("Wingate: RUNNING ON $host BY $::who.");
 
-           if (&::IsParam("wingateBan")) {
-               &::ban("*!*\@$host", "");
+           if (&::IsChanConf('wingateBan') > 0) {
+               &::ban("*!*\@$host", '');
            }
 
-           if (&::IsParam("wingateKick")) {
-               &::kick($::who, "", $::param{'wingateKick'});
+           my $reason  = &::getChanConf('wingateKick');
+           if ($reason) {
+               &::kick($::who, '', $reason);
            }
 
            push(@::wingateBad, "$host\*");