#!/usr/local/bin/perl

# Simple module to preform a kickban action

# These are the variables passed to each function call.
#
# $_[0] = name for this module (surely you already know this, but still)
# $_[1] = sending nickname
# $_[2] = sending username
# $_[3] = sending hostmask
# $_[4] = sending channel (or botnick in case of PM)
# $_[5] = current value for $modchan
# $_[6] = current value for $botnick
# $_[7] = first argument given in IRC
# $_[8] = second argument given in IRC etc.

# The package name must match the filename + .pm, so this file should be called "kickban.pm".
package kickban;

sub kb {
	nanobot::logts("Trying to kick\n");
	nanobot::snd("MODE $_[4] +b $_[8]");
	nanobot::snd("KICK $_[4] $_[7] Kickban");
}

sub help {
	nanobot::snd("NOTICE $_[1] :Usage: !kickban.kb user *@host");
}

# A module must always end with the line "1;", Perl demands it.
1;
