home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / bx75p3.zip / doc / tcl-ideas < prev    next >
Text File  |  1999-02-23  |  6KB  |  146 lines

  1. <jEkS> isban <ban> [channel]
  2. <jEkS> matchban <nick!user@host> [channel]
  3. <jEkS> isvoice <nickname> <channel>
  4. <jEkS> onchan <nickname> <channel>
  5. <jEkS> chanbans <channel>
  6. <jEkS> getchanhost <nickname> <channel>
  7. <jEkS> onchansplit <nick> <channel>
  8. <jEkS> chanlist <channel>
  9. <jEkS> getchanmode <channel>
  10. <jEkS> maskhost <nick!user@host>
  11. <jEkS> ctime <unixtime>
  12.  
  13. [Jeks(dcc)] .tcl return [expr 1 + 1]
  14.  
  15. <jEkS> :/set bot_tcl_command 1/0
  16. ForChannelOps #channel -minlevel -maxlevel command
  17. ForChannelNOps #channel -minlevel -maxlevel command
  18. inAway (if your away return 1)
  19.  
  20. [noob(dcc)] this is how the raw server data is handles
  21. [noob(dcc)] and if the raw numeric is specified
  22. [noob(dcc)] i.e.
  23.  
  24. [noob(dcc)] proc RAW_KICK { level } \
  25. [noob(dcc)] {
  26. [noob(dcc)] Echo [TopChannel] "blah" \[\04FunScript\04\]
  27. [noob(dcc)] }
  28. [noob(dcc)] proc RAW_303 { level } \
  29. [noob(dcc)] {
  30. [noob(dcc)] Echo "this that the other thing" blah
  31. [noob(dcc)] }
  32. [noob(dcc)] then when the server replys a 303
  33. [noob(dcc)]  /echo (blue)blah(blue) this that the other thing
  34. [noob(dcc)] via proc name
  35. [noob(dcc)] TCL's sockets are shitty
  36. [noob(dcc)] SockCreate socketname function blah blah
  37.  
  38. [noob(dcc)] proc PARTY {} \
  39. [noob(dcc)] {
  40. [noob(dcc)] set nErrCode [catch {SockCreate party "party " 1093 1 13}]
  41. [noob(dcc)] if { $nErrCode == 0 } \
  42. [noob(dcc)] {
  43. [noob(dcc)]                 global party
  44. [noob(dcc)]                 set party "ON"
  45. [noob(dcc)] Echo [MyNick] "Partyline Socket created..." PARTY!
  46. [noob(dcc)] SockListen party 3
  47. [noob(dcc)] if { $nErrCode != 0 } \
  48. [noob(dcc)] {
  49. [noob(dcc)] Echo [MyNick] "Can't listen with socket party" PARTY!
  50. [noob(dcc)] } else \
  51. [noob(dcc)] {
  52. [noob(dcc)] Echo [MyNick] "Partyline now active with socket party. To
  53. disable
  54.           type /noparty" PARTY!
  55. [noob(dcc)] }
  56. [noob(dcc)] }
  57. [noob(dcc)] } else \
  58. [noob(dcc)] {
  59. [noob(dcc)] Echo [MyNick] "Can't create socket" PARTY!
  60. [noob(dcc)] }
  61. [noob(dcc)] Complete
  62. [noob(dcc)] }
  63. [noob(dcc)] as u see... an alias is proc NAME(all caps)
  64. [noob(dcc)] it will listen to a socket at port 1093
  65. [noob(dcc)] if its able to create the socket sucsessfully it returns a 1
  66. [noob(dcc)] i mean it sets nerrcode to 0
  67. [noob(dcc)] otherwise it says cant listen with socket
  68. [noob(dcc)] and when u type /pass
  69. [noob(dcc)] it exicutes that proc
  70. [noob(dcc)] and u are then listening to port 1093
  71. [noob(dcc)] and the socket name is party
  72. [noob(dcc)] for every connection u would need this...
  73. [noob(dcc)] a onACCEPT
  74. [noob(dcc)] proc onACCEPT_party { name nErrCode } \
  75. [noob(dcc)] {
  76. [noob(dcc)] global last
  77. [noob(dcc)] set last ""
  78. [noob(dcc)] global user
  79. [noob(dcc)] incr user
  80. [noob(dcc)]         global user_$user
  81. [noob(dcc)]         set user_$user "1"
  82. [noob(dcc)]         set  $name party
  83. [noob(dcc)] Echo [MyNick] "hmm $name connected to partyline server1"
  84. [noob(dcc)] SockAccept "user_$user" $name
  85. [noob(dcc)]  if { $nErrCode != 0} { Echo [MyNick] "Problem with SockAccept "
  86. }
  87. [noob(dcc)] Echo [MyNick] "\01A new user joined the partyline.  This is user
  88.           $user\01"
  89. [noob(dcc)]         PostMsg "PAR user_$user@[SockRemoteIP $name] joined the
  90.           partyline!"
  91. [noob(dcc)]         SockSendT user_$user "\04Current commands are:\n"
  92. [noob(dcc)]         SockSendT user_$user ".\02me\02 <text> - action on
  93.           partyline\n"
  94. [noob(dcc)]         SockSendT user_$user ".\02nick\02 <nick> - change
  95.           partyline ID\n"
  96. [noob(dcc)]         SockSendT user_$user ".\02quit\02 <reason> - left on
  97.           partyline\n"
  98. [noob(dcc)]         SockSendT user_$user ".\02MSG\02 <nick> <text> - Sends a
  99.           msg to nick\n"
  100. [noob(dcc)]         SockSendT user_$user ".\02WHOM\02 - Tells you who is
  101.           connected\n"
  102. [noob(dcc)]         SockSendT user_$user ".\02DIE\02 <pass> - Kills the
  103.           partyline\n"
  104. [noob(dcc)]         SockSendT user_$user ".\02PING\02 - Checks for lag\n"
  105. [noob(dcc)]         SockSendT user_$user ".\02BOOT\02 <pass> <nick> - Kicks
  106. a
  107.           nick off the partyline\n"
  108. [noob(dcc)]         SockSendT user_$user "*** \04if u have more command
  109. ideas
  110.           try \02noob@america.com\02\04 *** \n"
  111. [noob(dcc)]         SockSendT user_$user "If you want to exit... Type .quit
  112.           reason to quit. Type .help for all commands. \n"
  113. [noob(dcc)]         SockSendT user_$user "\02Type \".nick <NewNick>\", Must
  114. be
  115.           within 9 letters.\n"
  116. [noob(dcc)]         Complete
  117. [noob(dcc)] }
  118. [noob(dcc)] that changes the sepcific's socket to its own socketname
  119. [noob(dcc)] that way u can have more then 1 connection at your port
  120. [noob(dcc)] and a SockClose
  121. [noob(dcc)] and a SockCloseAll
  122. [noob(dcc)] will be needed
  123. [noob(dcc)] a [SockLine $name] would be the last text recieved from socket
  124.           $name
  125.  
  126. [_jeks_(~jeks@msiw34.msi.se)] then you should check out
  127.           ftp://ftp.neosoft.com/pub/tcl/NEW there is a file called
  128.           tcl7.5p1plus.patch.gz .. use that..
  129. [_jeks_(~jeks@msiw34.msi.se)] then you can add a Tcl_InitIndependant (or
  130.           sumthing) to make the bin completly independant from any tcl libs
  131.           installed on the system..
  132. [_jeks_(~jeks@msiw34.msi.se)] great if you want to make a bin distrib.. then
  133.           it doesn't care wether tcl is installed or not..
  134.  
  135.           you could mail liotta@hotmail.com ..!
  136.  
  137. 2. kwak (Sep 25 23:42): abnout the [ircii args] function, I
  138.    think I need it to send to the tcl interpreter instead of the
  139.    screen, or maybe there should be a parameter to it.. like [ircii
  140.    -console args] to put it to screen.. Cause If I need a var it can't
  141.    be done.. like "/tcl set ircii-setlist [ircii set]  it only puts to
  142.    screen not to the var.. it is very important that it does.
  143. 3. kwak (Sep 25 23:43): cause then you can put some params from
  144.    ircii to the tcl.. like "/tcl set color1 [ircii eval echo ${C1}] or
  145.    whatever..
  146.