Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. function xchat_register()
  2. return "nick.lua", "nick nack", "0.1"
  3. end
  4.  
  5. function xchat_init()
  6. xchat.hook_command("", "cmd_nicks")
  7. end
  8.  
  9. function xchat_unload()
  10. end
  11.  
  12. function cmd_nicks(word, eol, data)
  13. local text = eol[1]
  14. if (string.sub(text, 1, 1) ~= "~") then
  15. return xchat.EAT_NONE
  16. end
  17.  
  18. local nick = string.sub(text, 2)
  19.  
  20. if (nick == "me" or string.len(nick) < 2) then
  21. xchat.commandf("nick ConnorBhoy")
  22. else
  23. xchat.commandf("nick ConnorBhoy|%s", nick)
  24. end
  25.  
  26. return xchat.EAT_NONE
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement