Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- raw 314:*: {
- ;.msg #ops $2 $+ 's whowas ID: $+($3,@,$4) and Real Name was: $6-
- if ($hasActiveSearch(314,$2)) {
- haltdef
- sendToUser $numeric $2 10 $2 $+ 's whowas ID: $+($3,@,$4) and Real Name was: $6-
- }
- }
- raw 406:*: {
- if ($hasActiveSearch(314,$2)) {
- haltdef
- sendToUser 314 $2 $2 $+ 's whowas information could not be found
- }
- }
- raw 369:*: {
- if ($hasActiveSearch(314,$2)) {
- haltdef
- removeRawUser 314 $2
- }
- }
- on *:text:*:#ops: {
- if ($nick isop $chan) && ($regex($1-,/(^|\s)(.idshow?w?s?\s\S+)/i)) {
- tokenize 32 $regml(2) | whois $2
- }
- if ($nick isop $chan) && ($regex($1-,/(^|\s)(.lastid?d?s?\s\S+)/i)) {
- addRawUser 314 $2 $nick
- if (!$hasActiveSearch(314,$2)) tokenize 32 $regml(2) | whowas $2
- }
- }
- ;/addRawUser [rawEventId] [searchTerm/searchForUser] [searchByUser]
- alias -l addRawUser {
- var %search = $2, %user = $3, %table = $+(event_search_table_,$1), %table2 = event_search_max
- if (!$hget(%table)) .hmake %table 2
- if (!$hget(%table2)) .hmake %table2 2
- if ($len($hget(%table,%search))) hadd %table %search $addtok($hget(%table,%search),%user,9)
- else hadd %table %search %user
- if (!$hget(%table2,$+($1,_,$2))) hadd event_search_max $+($1,_,$2) 0
- }
- ;/removeRawUser [rawEventId] [searchTerm/searchForUser]
- alias -l removeRawUser {
- var %search = $2, %table = $+(event_search_table_,$1), %table2 = event_search_max
- if ($len($hget(%table,%search))) {
- hdel %table %search
- if ($len($hget(%table2,$+($1,_,%search)))) {
- hdel %table2 $+($1,_,%search)
- }
- }
- }
- ;$hasActiveSearch([rawEventId],[searchTerm/searchForUser])
- alias -l hasActiveSearch {
- return $len($hget($+(event_search_table_,$1),$2))
- }
- ;/sendToUser [rawEventId] [searchTerm/searchForUser] [max] [message] (0 for no max)
- alias -l sendToUser {
- var %search = $2, %table = $+(event_search_table_,$1)
- if ($len($hget(%table,%search))) {
- var %table2 = event_search_max, %item = $+($1,_,%search)
- if ($len($hget(%table2, %item)) && ($hget(%table2, %item) < $3 || $3 == 0)) {
- hinc %table2 %item
- if ($3 == $hget(%table2, %item)) hdel %table2 %item
- var %users = $hget(%table,%search)
- while ($len(%users)) {
- .msg $gettok(%users,1,9) $4-
- %users = $deltok(%users,1,9)
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement