botlending forum  

Go Back   botlending forum > Eggdrop & TCL > Tcl scripting

Tcl scripting Tcl scripting related questions

Reply
 
LinkBack Thread Tools Display Modes
Old 14-03-2007, 14:45   #1 (permalink)
Junior Member
 
vR|Ar's Avatar
 
Join Date: Mar 2007
Location: PHIL
Posts: 6
Rep Power: 0
vR|Ar is an unknown quantity at this point
Send a message via Yahoo to vR|Ar
Exclamation HELP: i want to execute this on Help-chan ONLY :) not to execute on other channels.

Code:
bind join - * auto:invite 
  
set invitechan "#INVITE-chan"
set helpchan "#HELP-chan"
  
proc auto:invite {nick host handle chan} {
global invitechan helpchan
if {[matchattr handle n]} {
putserv "INVITE $nick $invitechan"
putquick "PRIVMSG $nick :\002 YOU ARE INVITED TO OUR CONSOLE CHANNEL"
} elseif {[matchattr $handle |n $helpchan]} {
putserv "INVITE $nick $invitechan"
     putquick "PRIVMSG $nick :\002 YOU ARE INVITED TO OUR CONSOLE CHANNEL"
 
    }
}
 
putlog "console-invite.tcl"
__________________
v R | A r
vR|Ar is offline   Reply With Quote
Old 21-03-2007, 17:02   #2 (permalink)
TCB & Ratings projects Member, #Mythic representative
 
arcade's Avatar
 
Join Date: Jun 2004
Location: In fatza calculatorului!!
Age: 19
Posts: 218
Rep Power: 37
arcade is on a distinguished road
Send a message via Yahoo to arcade
Default

Code:
set ichan(invite) "#invite-chan'
set ichan(help)  "#help"

bind  join n|n "*$ichan(help)*" auto:invite

proc auto:invite {nick host hand chan} {
global ichan ijoined

if {[isbotnick $nick] || [onchan $nick $ichan(invite)] || [info exists ijoined($nick,$chan)]} {return}
puserv "INVITE $nick $ichan(invite)"
puthelp "PRIVMSG $nick :\002 YOU ARE INVITED TO OUR CONSOLE CHANNEL"
set ijoined($nick,$chan) 1
timer 5 [unset ijoin($nick,$chan)]
}
oke, added universalia's suggestions, this should work fine now, added antiflood and a check to see if the person that joined the chan is already on the console

@universalia: oke, o sa incerc sa fiu cuminte, cat despre cod, o sa il gandesc putin ami mult inainte de a il posta
__________________
Fuck oFF!

Last edited by arcade; 22-03-2007 at 00:23.
arcade is offline   Reply With Quote
Old 06-04-2007, 21:31   #3 (permalink)
Administrator

aka aqwzsx
 
Join Date: Jun 2004
Posts: 827
Blog Entries: 126
Rep Power: 3
UniversaliA is on a distinguished road
Default

Vezi ce zice omul despre timer te rog, http://www.peterre.info/characters.html
UniversaliA is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
chan logging AdrianK Tcl scripting 11 02-11-2006 22:39
.+chan nu functioneaza krimson a&a light script 2 23-05-2006 23:32
Setari de chan GoRaPiD Tcl scripting 1 19-11-2004 08:39
Bad Chan Tcl GoRaPiD Tcl scripting 14 18-07-2004 18:34
$chan arg JohnyWalker Tcl scripting 1 14-06-2004 12:44


All times are GMT +3. The time now is 07:18.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.