Snippets
  • Uploaded By: entropy
  • Added: 2 years ago
  • Updated: 2 years ago
  • mIRC Version: v6.35+
  • Hits: 743
  • Size: 2.04KB
  • Downloads: 18
  • Review By: entropy



!tell v2.5

This sweet snippet is like memoserv for networks without services.
Screenshot...

    
  2    0  Login to Vote.


Source Code:
  1. ; !tell v2.5 - by entropy 2019
  2.  
  3. on *:start:{ hmake tells 100 | if ($exists($qt($scriptdirtells.dat))) { hload tells $qt($scriptdirtells.dat) } | .timersaveall -o 0 300 saveallx }
  4. on *:exit:{ saveallx }
  5. on *:unload:{ .timersaveall off | if ($hget(tells)) { hfree tells } }
  6.  
  7. alias -l saveallx { if ($hget(tells)) { hsave -o tells $qt($scriptdirtells.dat) } }
  8. alias -l unsafe return $!decode( $encode($1-,m) ,m)
  9.  
  10. menu menubar,status,channel,query {
  11. -
  12. Tell v2.5 $chr(9) $+([,$replace($group(#tell).status,on,On,off,Off),]) {
  13. var %a = $group(#tell).status
  14. $iif(%a == off,.enable,.disable) #tell
  15. var %a = $group(#tell).status
  16. echo -tag $chr(9679) Tell v2.5 is now: $+($chr(2),$replace(%a,off,Off,on,On),$chr(2))
  17. }
  18. -
  19. }
  20.  
  21. #tell on
  22. on *:text:*:#:{ tellem $1- }
  23. on *:input:#:{ tellem $1- }
  24.  
  25. alias -l tellem {
  26. if (?tell iswm $1 && $left($1,1) isin @!.) {
  27. if ($iif($event == text,$nick,$me) == $2) { .timertell -o 1 1 msg $unsafe( # ) You can't tell yourself! }
  28. elseif ($2) {
  29. if (!$3) { msg # No text specified to send! | return }
  30. var %2 = $remove($2,$chr(44),$chr(46),:)
  31. hadd -m tells $+($iif($event == text,$nick,$me),.,%2,.,$ctime,.,$network) $strip($3-)
  32. .timertell -o 1 1 msg $unsafe( # ) $iif($event == text,$nick,$me) $+ $chr(44) I will pass it along next time %2 is around.
  33. }
  34. else { msg # No such user specified! }
  35. }
  36. else { $+(.timerjoin,#,$network) -o 1 2 dojoin $iif($event == text,$nick,$me) $network $unsafe( # ) }
  37. }
  38.  
  39. on *:action:*:#:{ $+(.timerjoin,#,$network) -o 1 2 dojoin $nick $network $unsafe( # ) }
  40.  
  41. alias -l dojoin {
  42. var %a = 1, %b, %t = 0
  43. while ($hfind(tells,$+(*.,$1,.*.,$2),1,w).item) {
  44. %b = $v1
  45. inc %t 2
  46. var -n %g = $remove($hget(tells,%b),$chr(32))
  47. .timer -o 1 %t .notice $1 $gettok(%b,1,46) said: " $+ %g $+ " $asctime($gettok(%b,3,46),hh:nntt) $+($chr(40),$replace($duration($calc($ctime - $gettok(%b,3,46))),wks,w,wk,w,days,d,day,d,hrs,h,hr,h,mins,m,min,m,secs,s,sec,s) ago,$chr(41))
  48. hdel tells %b
  49. }
  50. }
  51. #tell end


Comments
No Comments.

Login to Comment.