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 

Test.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: 22/08/2007 12:28    Post subject: Test.tcl Reply with quote

Code:
set question(1) {"line 1"}
set question(2) {"line 2"}
set question(3) {"line 3"}
set question(4) {"line 4"}
set question(5) {"line 5"}
set question(6) {"line 6"}
set question(7) {"line 7"}
set question(8) {"line 8"}
set question(9) {"line 9"}
set question(10) {"line 10"}




bind pub - !question pub:question
proc pub:question {nick uhost hand chan text} {
global question(1) question(2) question(3) question(4) question(5) question(6) question(7) question(8) question(9) question(10)

if {![matchattr $hand m|m $channel]} {
     putserv "PRIVMSG $channel :Sorry, you are not authorized to use this command."
     return 0
  }
  if {[string tolower [lindex $arg 0]] == "1"} {
foreach line $question(1) { puthelp "NOTICE $nick :$line" }
  } else {
  if {[string tolower [lindex $arg 0]] == "2"} {
foreach line $question(2) { puthelp "NOTICE $nick :$line" }
  } else {
  if {[string tolower [lindex $arg 0]] == "3"} {
foreach line $question(3) { puthelp "NOTICE $nick :$line" }
  } else {
  if {[string tolower [lindex $arg 0]] == "4"} {
foreach line $question(4) { puthelp "NOTICE $nick :$line" }
  } else {
  if {[string tolower [lindex $arg 0]] == "5"} {
foreach line $question(5) { puthelp "NOTICE $nick :$line" }
  } else {
  if {[string tolower [lindex $arg 0]] == "6"} {
foreach line $question(6) { puthelp "NOTICE $nick :$line" }
  } else {
  if {[string tolower [lindex $arg 0]] == "7"} {
foreach line $question(7) { puthelp "NOTICE $nick :$line" }
  } else {
  if {[string tolower [lindex $arg 0]] == "8"} {
foreach line $question(8) { puthelp "NOTICE $nick :$line" }
  } else {
  if {[string tolower [lindex $arg 0]] == "9"} {
foreach line $question(9) { puthelp "NOTICE $nick :$line" }
  } else {
  if {[string tolower [lindex $arg 0]] == "10"} {
foreach line $question(10) { puthelp "NOTICE $nick :$line" }
  }


}
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 17:56    Post subject: Reply with quote

I like your post, very interesting indeed.
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 20:03    Post subject: Reply with quote

This is simply amazing!
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