egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need Help from IRC Script to TCL

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
JoKeR
Voice


Joined: 14 Nov 2006
Posts: 3

PostPosted: Tue Nov 14, 2006 10:14 am    Post subject: Need Help from IRC Script to TCL Reply with quote

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!) Very Happy
_________________
irc.HellIRC.Org - The Power of IRC
Back to top
View user's profile Send private message MSN Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Tue Nov 14, 2006 3:27 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
JoKeR
Voice


Joined: 14 Nov 2006
Posts: 3

PostPosted: Fri Nov 17, 2006 1:48 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Fri Nov 17, 2006 1:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
JoKeR
Voice


Joined: 14 Nov 2006
Posts: 3

PostPosted: Sun Nov 19, 2006 4:05 pm    Post subject: Reply with quote

It doesn't found...I don't understand why...
Please Help Sad

-------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
View user's profile Send private message MSN Messenger
Justdabomb2
Voice


Joined: 29 Sep 2006
Posts: 37
Location: United States of America

PostPosted: Sun Nov 19, 2006 5:10 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber