diff options
| author | David Phillips <david@sighup.nz> | 2017-03-09 11:37:31 +1300 | 
|---|---|---|
| committer | David Phillips <david@sighup.nz> | 2017-03-09 11:37:31 +1300 | 
| commit | a7c02881a10c6e61d37263cf1d423c27e37c6456 (patch) | |
| tree | df5944fefbfa24c785c93025414903b8f868afe0 /saxrobot | |
| parent | 926886e054edd1dd67e3195416c1c183f3850946 (diff) | |
| download | idalius-a7c02881a10c6e61d37263cf1d423c27e37c6456.tar.xz | |
Implement rough multi-channel parts
Diffstat (limited to 'saxrobot')
| -rwxr-xr-x | saxrobot | 12 | 
1 files changed, 4 insertions, 8 deletions
@@ -103,14 +103,10 @@ sub irc_msg {  	}  	if ($what =~ /^part\s/) {  		my $message; -		my ($channel, $message) = $what =~ /^part\s+(\S+)(\s(.*))?$/; -		if ($channel) { -			if (!$message) { -				$message = "commanded by $nick"; -			} else { -				$message =~ s/^\s+//; -			} -			$irc->yield(part => $channel => $message); +		if ($what =~ /^part(\s+(\S+))+$/m) { +			my @args = split /\s+/, $what; +			print for @args; +			$irc->yield(part => @args);  		} else {  			$irc->yield(privmsg => $nick => "Syntax: part [partmsg]");  		}  | 
