Advertisement
westor

Kicks Save + Lookup for Gheta v1.2

Mar 24th, 2020
1,062
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.84 KB | None | 0 0
  1. alias load_kicks {
  2.   var %f = kicks.db
  3.  
  4.   if (!$hget(KICKS)) { hmake KICKS 5000 }
  5.  
  6.   if ($file(%f)) { hload KICKS $qt(%f) }
  7. }
  8.  
  9. alias save_kicks {
  10.   var %f = kicks.db
  11.  
  12.   if (!$hget(KICKS)) || (!$hget(KICKS,0).item) { return }
  13.  
  14.   hsave KICKS $qt(%f)
  15. }
  16.  
  17. ON *:LOAD: { load_kicks }
  18. ON *:UNLOAD: { save_kicks }
  19. ON *:START: { load_kicks }
  20. ON *:EXIT: { save_kicks }
  21.  
  22. ON *:KICK:#: { hadd KICKS $knick $nick $ctime $1- }
  23.  
  24. alias kresult {
  25.   if (!$1) { echo 4 -ae * Kicks: Error, Please insert a nickname! | return }
  26.   var %r = $hget(KICKS,$1)
  27.  
  28.   if (!%r) { echo 4 -ae * Kicks: Error, That nickname does NOT exists in the database! | return }
  29.  
  30.   var %by = $gettok(%r,1,32)
  31.   var %time = $gettok(%r,2,32)
  32.   var %reason = $gettok(%r,3-,32)
  33.  
  34.   echo -ae * Kicks: Nickname $1 was kicked on $asctime(%time) by %by nickname with reason: %reason
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement