Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($str.grep("^!time", $3, r, 0)) {
- echo "Time script"
- %filePath = "/home/mike/src/kvirc/times.txt"
- %nick = $str.rightfromfirst($3,"!time ")
- if (%nick == $null) {
- %nick = $0
- }
- %regex = ("(^"%nick"=)"|"(^"%nick"\\*)"|"(\\*"%nick"\\*)"|"(\\*"%nick"=)")
- %lines = $str.split($lf, $file.read(%filePath))
- %cLine = $str.grep(%regex, %lines, r, 0)
- if (%cLine == $null) {
- msg $chan.name "I don't know nothin' about no foo' named" %nick"!"
- halt
- }
- %Timezone = $str.replace($str.rightfromfirst(%cLine, "="), " ", "%20")
- %Date = ""
- %Data = ""
- %timeSocket = $new(time)
- %timeSocket->%name = %nick
- %timeSocket->%chan = $chan.name
- }
Add Comment
Please, Sign In to add comment