#!/usr/local/bin/perl

# Module created to voice everyone in a specific channel. 
# This is the same functionality as !all voice, but not bound to $modchan.

# 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 "autovoice.pm".
package autovoice;

sub join {
	if($_[4] =~ /#ddg/) {
		nanobot::snd("MODE $_[4] +v $_[1]");
	}
}

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