Guest User

Untitled

a guest
Oct 18th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. if ($str.grep("^!time", $3, r, 0)) {
  2. echo "Time script"
  3. %filePath = "/home/mike/src/kvirc/times.txt"
  4.  
  5. %nick = $str.rightfromfirst($3,"!time ")
  6. if (%nick == $null) {
  7. %nick = $0
  8. }
  9. %regex = ("(^"%nick"=)"|"(^"%nick"\\*)"|"(\\*"%nick"\\*)"|"(\\*"%nick"=)")
  10. %lines = $str.split($lf, $file.read(%filePath))
  11. %cLine = $str.grep(%regex, %lines, r, 0)
  12. if (%cLine == $null) {
  13. msg $chan.name "I don't know nothin' about no foo' named" %nick"!"
  14. halt
  15. }
  16. %Timezone = $str.replace($str.rightfromfirst(%cLine, "="), " ", "%20")
  17.  
  18. %Date = ""
  19. %Data = ""
  20. %timeSocket = $new(time)
  21. %timeSocket->%name = %nick
  22. %timeSocket->%chan = $chan.name
  23. }
Add Comment
Please, Sign In to add comment