All pastes #263564 Raw Edit

Unnamed

public text v1 · immutable
·published 2006-12-01 17:19 UTC
rendered paste body
sub on_names {
	my ($self,$event)=@_;
	my ($name,$list);
	my (@list,$channel)=($event->args);

	($channel,$list)=splice @list,2;
	print colored (">> ",'cyan');
	print "Users on $channel: $list\n";

	my %list=split(/ /,$list);

	foreach $name (%list) {
		my ( $op, $halfop, $voice );
       	$op    = 1 if s/^\@//;
       	$halfop= 1 if s/^\%//;
       	$voice = 1 if s/^\+//;
       	$info{ lc $channel }{users}{$_,1} = {};
       	$info{ lc $channel }{users}{substr($_,1)}{op}    = 1 if $op;
       	$info{ lc $channel }{users}{substr($_,1)}{halfop}= 1 if $halfop;
       	$info{ lc $channel }{users}{substr($_,1)}{voice} = 1 if $voice;
	}
}