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:
1 parent
ccce5d5ef6
commit
a04e181378
4 files changed
+58
-6
No files matched your search
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user