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.

leave a message to users

Old posts that have not been replied to for several years.
Locked
M
Maverick

Post by Maverick »

I made a script that checks, if a user has more than x hostmasks. If it is, i want the bot to leave that users a message like ".note <handle> <text>". I dont know how, can someone help me plz?

.
.
.
foreach host [getuser $user hosts] {
incr hostcount 1
}
if {$hostcount >= $hosts} {
append list "$user, "
incr usercount 1
}
.
.
.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Somthing like

Code: Select all

foreach user [userlist] {
  if {[llength [getuser $user hosts]] > $maxhosts} {
    sendnote $user "ntoo many hosts"
  }
}
Replace sendnote with your command for sending notes, or read the tcl-command.doc help file for a lists of commands.
M
Maverick

Post by Maverick »

that´s my problem, what is the equal command in tcl for the dcc-command .note ?
btw, is there an Editor available that checks syntax and stuff ??

<font size=-1>[ This Message was edited by: Maverick on 2002-05-27 09:40 ]</font>
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

As stated in my post. Check tcl-commands.doc. It has all the commands listed.

If you can't be bothered to looks, we sure as hell won't help you do it.
t
tainted
Master
Posts: 239
Joined: Sun May 12, 2002 8:00 pm
Location: chicago
Contact:

Post by tainted »

I read this then realized, "Hey! Good idea!" so here it is:

##set this to how many hosts to check for
set maxhosts 5
##this is the user the note is sent from
set notenick "nick"

bind dcc n hostcheck hostcheck_start
proc hostcheck_start {n u h} {
foreach user [userlist] {
if {[llength [getuser $user hosts]] > $maxhosts} {
sendnote $notenick $user "Please remove some of your hosts."
putlog "$user has too many hosts, sending note..."
}
}
}


<font size=-1>[ This Message was edited by: tainted on 2002-05-29 14:03 ]</font>

<font size=-1>[ This Message was edited by: tainted on 2002-05-29 14:05 ]</font>
M
Maverick

Post by Maverick »

it works fine, thx to all.
Locked