This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Silly Question - Easy Answer [ solved my self ]

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
w
whittinghamj
Op
Posts: 103
Joined: Sun May 21, 2006 4:50 pm

Silly Question - Easy Answer [ solved my self ]

Post by whittinghamj »

hey guys.

I am having some issues with the following.

Can someone help me with this please.

Code: Select all


bind pub - !kick pub:kick

proc pub:kick {nick uhost hand chan arg} {  
  putserv "kick $chan $arg REASON SET HERE IN SCRIPT - NOT ON IRC"
}

What might I be doing wrong?
I know there is no security on this bind / proc but its just for learning right now. I will use a auth system later on.

Thanks in advance you godly guru's :D

God bless
Last edited by whittinghamj on Thu Jun 01, 2006 12:40 am, edited 1 time in total.
w
whittinghamj
Op
Posts: 103
Joined: Sun May 21, 2006 4:50 pm

Post by whittinghamj »

never mind - i fixed it in the original post - i was missing a close brace

its amazing how much trouble ] can do instead of a }

/me bands head on desk lol
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

It's wrong anyway, you should always split the arg to make the string a list incase of special characters.

Code: Select all

bind pub - !kick pub:kick

proc pub:kick {nick uhost hand chan arg} { 
  putserv "KICK $chan [lindex [split $arg] 0] :REASON SET HERE IN SCRIPT - NOT ON IRC"
} 
Also for future posts of you, try actually reading the error TCL returns, it would have clearly stated that you were missing a brace and there would be no need to post here about it then.

PS: why do you keep saying 'god bless' in all yours posts, i find it annoying though i don't know why.
w
whittinghamj
Op
Posts: 103
Joined: Sun May 21, 2006 4:50 pm

Post by whittinghamj »

MeTroiD

Thanks for your post, I was soooo figging tired when I posted that I did not know what I was doing lol.

Thanks for the code and tips.

As for the "god bless" to be honest, I dont really know why I put it in my posts. Just trying to be nice and friendly I guess and its something you dont hear that often any more. No offence intended by it :-s
Post Reply