| View previous topic :: View next topic |
| Author |
Message |
JoKeR Voice
Joined: 14 Nov 2006 Posts: 3
|
Posted: Tue Nov 14, 2006 10:14 am Post subject: Need Help from IRC Script to TCL |
|
|
Hi, this is my first message and i know that starting with requestes it's not the right way to start, but I really need that.
So, I don't know anything about TCL scripting...I tried to see some guides but for me it's like Arabic...
I've this IRC script:
| Code: |
on *:text:!add*:#chan:{
if ($nick == JoKeR) && ($2 != $null) set %access $addtok(%access,$2,32)
{ msg #lab 14[4Security14] 7 $2 2Succefully Added! }
}
on *:join:#chan:{
{ msg #lab 14[4Security14] 2Searching for your UserName... }
if ($istok(%access,$nick,32) == $false) {
mode $chan +b $address($nick,1) | msg #lab 14[4Security14] 2Access not allowed for 7 $nick 2! | kick $chan $nick Access not allowed! Info: JoKeR }
if ($istok(%access,$nick,32) != $false) { msg #lab 14[4Security14] 2Access Allowed for 7 $nick ! }
}
|
Now I want to transform to TCL script, with some modify:
1) More users can add user to the access list (ex User1, User2, User3)
2) I would use the same TCL for more channel (ex Chan1, Chan2, Chan3)
3) I don't want to ban users that aren't on the access list, but i want to sapart them, or, if it's impossible, to set a timed ban
4) Add a !del command that leave the nick from the access list
If you could do it, please also explane me how the script is maked, so next time i would try by myself.
Thx (Sorry I don't know if my English is correct, I'm from Rome!)  _________________ irc.HellIRC.Org - The Power of IRC |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Tue Nov 14, 2006 3:27 pm Post subject: |
|
|
This forum is not for translating mIRC to TCL, it's a "requests" forum. This means, request a script and maybe someone will implement it for you.
Also, did you try to search the Tcl Archive? This seems like a blacklist script (you can also use Eggdrop's internal banlist for this). _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
JoKeR Voice
Joined: 14 Nov 2006 Posts: 3
|
Posted: Fri Nov 17, 2006 1:48 pm Post subject: |
|
|
Ok sorry...I tried to do by myself with some guides but I don't know if it's correct or not.
| Code: |
bind pub - !add pub:add
bind join - "#lab *" evnt:join
proc pub:add {nick uhost hand chan arg} {
global access
if {[string equal -nocase $nick JoKeR] || [string equal -nocase $nick OtherNick] || [string equal -nocase $nick ThirdNick]} {
lappend access($chan) $arg
}
puthelp "PRIVMSG $chan :\00314[\00304Security\00314] \00307 $arg \00302Insertio Con Successo!\003"
}
proc evnt:join {nick uhost hand chan} {
global access
if {[lsearch access($chan) $nick]} {
newchanban $chan *!$uhost - "\00314[\00304Security\00314] \00302 Access not allowed \003"
} else {
puthelp "PRIVMSG $chan : \00314[\00304Security\00314] \00302 Access Allowed for \00302${nick}!\003"
}
}
|
Can you tell me if it's correct? It should set different access listes, one for each chan, and different nicks should add users to the access list.
One thing I can't do...the command !del
Now can you help me?
thx _________________ irc.HellIRC.Org - The Power of IRC |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Fri Nov 17, 2006 1:53 pm Post subject: |
|
|
Why don't you try it out and see yourself?
Also, You need to check the lsearch return for either -1 or anything else, what you use right now would also ban the *first* user on your little access list.
(Also, checking specifically by nick is stupid, very stupid. If someone uses your nick, he can use your script)
Bind the flag to a proper flag instead and make sure the eggdrop knows you at all times. |
|
| Back to top |
|
 |
JoKeR Voice
Joined: 14 Nov 2006 Posts: 3
|
Posted: Sun Nov 19, 2006 4:05 pm Post subject: |
|
|
It doesn't found...I don't understand why...
Please Help
-------EDIT-------------
I tried and i tried...this is the result:
| Code: |
[21:17] <JoKeR> .:( 21:16"17 ):. <POiNT|SECURiTY> [15:17] Tcl error [pub:add]: invalid command name "Security"
[21:17] <JoKeR> .:( 21:16"26 ):. <POiNT|SECURiTY> [15:17] Tcl error [evnt:join]: invalid command name "Security"
|
Why? _________________ irc.HellIRC.Org - The Power of IRC |
|
| Back to top |
|
 |
Justdabomb2 Voice
Joined: 29 Sep 2006 Posts: 37 Location: United States of America
|
Posted: Sun Nov 19, 2006 5:10 pm Post subject: |
|
|
it thinks you are trying to use "security" as a command because it is in bewteen [ and ]. If you want the bracktes to show up on the message to the channel , use "\[" and "\]" _________________ Yeah! |
|
| Back to top |
|
 |
|