UnderNet.MyForum.ro UnderNet.MyForum.ro
Welcome To UnderNet`s Forum
UnderNet.MyForum.ro
FAQFAQ  SearchSearch  RegisterRegister  ProfileProfile  MemberlistMemberlist  UsergroupsUsergroups  Log in to check your private messagesLog in to check your private messages  Log inLog in 

Next.tcl

 
Reply to topic    UnderNet.MyForum.ro Forum Index -> TCL
View previous topic :: View next topic  
Author Message
MeBoy
Comandant
Comandant


Joined: 15 Aug 2007
Posts: 13

PostPosted: 15/08/2007 15:20    Post subject: Next.tcl Reply with quote

Code:
bind msg n .next next:status

proc next:status {nick uhost hand text} {
  set chan [lindex [split $text] 0]
  if {$chan == ""} {
    putserv "PRIVMSG $nick :Type \".next #channel\" for it's current status on the #channel or \".next #channel on/off\" to change it enable or disable it."
    return
  }
  if {![validchan $chan]} {
    putserv "PRIVMSG $nick :Sorry, $chan isn't a valid channel. Pick a valid one."
    return
  }
  set cmd [lindex [split $text] 1]
  set status [channel get $chan next]
  switch -- [string tolower $cmd] {
    "on" {
      if {$status} {
        putserv "PRIVMSG $nick :Next script is \002ALLREADY\002 enabled on $chan. Don't do that again!"
        return
      }
      channel set $chan +next
      putserv "PRIVMSG $nick :Next script is now \002enabled\002 on $chan."
    }
    "off" {
      if !{$status} {
        putserv "PRIVMSG $nick :Next script is \002ALLREADY\002 disabled on $chan. Don't do that again!"
        return
      }
      channel set $chan -next
      putserv "PRIVMSG $nick :Next script is now \002disabled\002 on $chan."
    }
    default {
      if {$status} {
        set status "enabled"
        } else {
        set status "disabled"
      }
      putserv "PRIVMSG $nick :Current status of the .next script on $chan is: \002$status\002"
    }
  }
}
Back to top
View user's profile Send private message
Author Message
ironsky2
Junior
Junior


Joined: 01 Jun 2012
Posts: 12
Location: Ukraine

PostPosted: 01/06/2012 21:30    Post subject: Reply with quote

This is awesome!
Back to top
View user's profile Send private message
Author Message
uahanamiti
Junior
Junior


Joined: 11 Jun 2012
Posts: 13
Location: Ukraine

PostPosted: 14/07/2012 10:44    Post subject: Reply with quote

How cool is that!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    UnderNet.MyForum.ro Forum Index -> TCL All times are GMT + 3 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro