Added match_mask() to API::IRC and match_user() to API::Std, match_user checks

config user:mask to find a user block, if a match is found, the configured username
is returned.
This commit is contained in:
Elijah Perrault committed 2011-01-30 10:26:51 -07:00
1 parent ccce5d5ef6
commit a04e181378
4 files changed
+58 -6

No files matched your search

+12
View File
@@ -230,6 +230,18 @@ else {
}
undef $it;
### NOTE: REMOVE THIS FROM MAINLINE CODE. IT IS FOR DEVELOPMENT PURPOSES ONLY. ###
sub hw {
my (%data) = @_; my @argv = @{ $data{args} };
if (API::Std::match_user(( 'nick' => $data{nick}, 'user' => $data{user}, 'host' => $data{host} ))) {
API::IRC::privmsg($data{svr}, $data{chan}, @argv);
}
return 1;
}
cmd_add("SAY", 0, 0, 0, \&Auto::hw) or exit;
### End ###
# Infinite while loop.
while (1) {
# Timer check.