Advertisement
Guest User

Untitled

a guest
Aug 4th, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. on *:text:!addcom *:#: {
  2. if ($nick isop #) {
  3. var %r = $read(commands.txt,ns,$2)
  4. if (%r) { .msg $chan [ $+ $nick $+ ]: Error, This command $qt($2) is already exist into the database! | return }
  5. write commands.txt $2-
  6. msg $chan /me + Command $2 has been added to the database!
  7. }
  8. }
  9. on *:text:!delcom *:#: {
  10. if ($nick isop #) {
  11. var %r = $read(commands.txt,ns,$2)
  12. if (!%r) { .msg $chan [ $+ $nick $+ ]: Error, This command $qt($2) does NOT exist into the database! | return }
  13. write -dl $+ $readn commands.txt
  14. msg $chan /me - Command $2- has been deleted from the database!
  15. }
  16. }
  17. on *:text:!editcom & *:#: {
  18. if ($nick isop #) {
  19. var %r = $read(commands.txt,ns,$2)
  20. if (!%r) { .msg $chan [ $+ $nick $+ ]: Error, This command $qt($2) does NOT exist into the database! | return }
  21. write -l $+ $readn commands.txt $2-
  22. msg $chan /me -> Command $2 has been updated!
  23. }
  24. }
  25. ON *:TEXT:*:#: {
  26. tokenize 32 $strip($1-,burci)
  27. if ($read(commands.txt, nts, $1)) {
  28. var %com = $v1
  29. var %com = $replace(%com,@user@,$iif($2,$2,?),@nick@,$nick,@target@,$target)
  30. if (-ul=mod == $gettok(%com,1,32)) && ($nick !isop $chan) { msg $chan | return }
  31. msg $chan $iif(-ul=mod == $gettok(%com,1,32),$gettok(%com,2-,32),$gettok(%com,1-,32))
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement