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.

too many procedure

Old posts that have not been replied to for several years.
Locked
r
rambo

too many procedure

Post by rambo »

Code: Select all

#########Oper##################
set onick "nick"
set pass "password"
bind dcc O oper dcc:oper
proc dcc:oper {nick host text} {
putserv "oper $onick $pass"
}
###########KILL#################
bind dcc O kill dcc:kill
proc dcc:kill {nick host} {
putserv "kill $nick"
}
###############
#and after second procedure,bot say to me "too many arguments"
#why?
#
#
[/code]
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

See tcl-commands.doc for information, on what arguments each procedure ois provided, for each type of bind.

You can't just use
proc dcc:kill {nick host} {
And expect the script, to know what information you want providing.

The reality is, you should be knowing what the eggdrop is providing the script.
m
mortician
Voice
Posts: 37
Joined: Sun Sep 22, 2002 6:35 pm
Location: Tsjakamaka
Contact:

Post by mortician »

in the proc dcc:oper you should get your variables onick and pass first, then it would look like this:

Code: Select all

proc dcc:oper {nick host text}  {
global onick pass
putserv "oper $onick $pass"
}
in the second proc, it tells you too many arguments ... a dcc bind will pass 3 variables to the procedure: handle, idx and text. You did it correct in your first proc, but you forgot text in dcc:kill

Code: Select all

bind dcc O kill dcc:kill
proc dcc:kill {nick idx text} {
putserv "kill $nick"
}
but this would kill the user on your server with the nick of your handle ... so I guess you want to do in the pline "kill <nick>", then the proc should look like this:

Code: Select all

bind dcc O kill dcc:kill
proc dcc:kill {nick idx text} {
set target [lindex [split $text] 0] 
putserv "kill $target"
}
I
Ian-Highlander
Op
Posts: 165
Joined: Mon Sep 24, 2001 8:00 pm
Location: Ely, Cambridgeshire

Post by Ian-Highlander »

Here's a sysop script I started working on over a year ago and never got round to testing or finishing.

Some of it probably works, but it will need a fair bit of work doing on it and hasnt had the security checking routines put into it yet either.

It was a work in progress, but as my interest in eggdrop scripting gets less and less due to having no spare time, if anyone can make use of this then they are welcome to it.

http://www.highlandfox.com/downloads/system_bot.tcl

Note this was written initially for my server which runs Unreal IRCd and Auspice Services so not all commands may be appropriate.

Let me know if its any use and how you get on with it. ;)

Regards

Ian-Highlander
"Insanity Takes Its Toll, Please Have Exact Change"
Locked