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.
Old posts that have not been replied to for several years.
DarkJFMan
Halfop
Posts: 85 Joined: Mon Dec 15, 2003 3:19 pm
Post
by DarkJFMan » Thu Jun 17, 2004 3:39 am
Code: Select all
# `DeVoice <nick>
bind pub - `dev pub:dvnick
proc pub:dvnick {nick uhost hand chan text} {
global owner
if {[$nick != $owner]} { putserv "NOTICE $nick :You don't have access" }
else { putserv "MODE $chan -v $text"
putserv "PRIVMSG $chan :$nick is now -V" }
}
[12:28:19am] <DarkJFGirl> [03:26] Tcl error [pub:dvnick]: invalid command name "DarkJFMan"
What's wrong with it?
Papillon
Owner
Posts: 724 Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no
Post
by Papillon » Thu Jun 17, 2004 3:56 am
Elen sila lúmenn' omentielvo
DarkJFMan
Halfop
Posts: 85 Joined: Mon Dec 15, 2003 3:19 pm
Post
by DarkJFMan » Thu Jun 17, 2004 3:59 am
Code: Select all
bind pub - `kb pub:bkick
proc pub:bkick {nick uhost hand chan arg} {
global owner botnick
set bnick [join [lindex $arg 0]]
if {$nick != $owner} {
putserv "NOTICE $nick :You don't have access"
} else {
putserv "MODE $chan +b *!*@[join [lindex [split [getchanhost $bnick] "@"] 1]]"
putkick "$chan $bnick Kicked on request of $nick"
utimer [lindex $arg 1] putserv "MODE $chan -b *!*@[join [lindex [split [getchanhost $bnick] "@"] 1]]"
putserv "PRIVMSG $chan :$bnick has been banned for [duration [lindex $arg 1]]
}
}
whenever i try to load it, my bot crash any help plz
Papillon
Owner
Posts: 724 Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no
Post
by Papillon » Thu Jun 17, 2004 7:46 am
it helps if you tell us what the error returned is
Elen sila lúmenn' omentielvo
DarkJFMan
Halfop
Posts: 85 Joined: Mon Dec 15, 2003 3:19 pm
Post
by DarkJFMan » Thu Jun 17, 2004 8:02 am
[05:03:09am] <DarkJFGirl> [08:01] Tcl error [pub:bkick]: wrong # args: should be "putkick channel nick?s? ?comment?"
[05:03:10am] <DarkJFGirl> [08:01] #hooters: mode change '+b *!*@CS-Open`Bot.user.gamesurge' by DarkJFGirl!~
lamest@DarkJFGirl.user.gamesurge
Last line in the script I put i forgot " but i fixed that. So any ideas?
Papillon
Owner
Posts: 724 Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no
Post
by Papillon » Thu Jun 17, 2004 8:22 am
read the errormsg carefully and you'll be told what's wrong..
Code: Select all
#when enclosed in "'s the arguments is read as ONE argument
putkick "$chan $bnick Kicked on request of $nick"
#this is the correct way
putkick $chan $bnick "Kicked on request of $nick"
Elen sila lúmenn' omentielvo
DarkJFMan
Halfop
Posts: 85 Joined: Mon Dec 15, 2003 3:19 pm
Post
by DarkJFMan » Thu Jun 17, 2004 10:07 am
[07:07:29am] <DarkJFGirl> [10:05] Tcl error in script for 'timer3':
[07:07:30am] <DarkJFGirl> [10:05] wrong # args: should be "putserv text ?options?"
# `Bankick <nick>
bind pub - `kb pub:bkick
proc pub:bkick {nick uhost hand chan arg} {
global owner botnick
set bnick [join [lindex $arg 0]]
if {$nick != $owner} {
putserv "NOTICE $nick :You don't have access"
} else {
putserv "MODE $chan +b *!*@[join [lindex [split [getchanhost $bnick] "@"] 1]]"
putkick $chan $bnick "Kicked on request of $nick"
utimer [lindex $arg 1] "putserv MODE $chan -b *!*@[join [lindex [split [getchanhost $bnick] "@"] 1]]"
putserv "PRIVMSG $chan :$bnick has been banned for [duration [lindex $arg 1]]"
}
}
is it the utimer? because my bot is banning/kicking correctly it's just not unbanning.
greenbear
Owner
Posts: 733 Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway
Post
by greenbear » Thu Jun 17, 2004 10:19 am
Code: Select all
utimer [lindex $arg 1] [putserv "MODE $chan -b *!*@[join [lindex [split [getchanhost $bnick] "@"] 1]]"]
strikelight
Owner
Posts: 708 Joined: Mon Oct 07, 2002 10:39 am
Contact:
Post
by strikelight » Thu Jun 17, 2004 12:59 pm
gb wrote: Code: Select all
utimer [lindex $arg 1] [putserv "MODE $chan -b *!*@[join [lindex [split [getchanhost $bnick] "@"] 1]]"]
What's the point of using a utimer, if you are just going to have the command executed right away anyways? (Ie. the []'s invoking the command substitution) ...
Think you might have meant [list putserv , but left out the 'list' ...
Code: Select all
utimer [lindex $arg 1] [list putserv "MODE $chan -b *!*@[join [lindex [split [getchanhost $bnick] "@"] 1]]"]
greenbear
Owner
Posts: 733 Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway
Post
by greenbear » Thu Jun 17, 2004 1:07 pm
hehe, oops, guess i was a bit fast there, i actually ment to use braces, not brackets
DarkJFMan
Halfop
Posts: 85 Joined: Mon Dec 15, 2003 3:19 pm
Post
by DarkJFMan » Thu Jun 17, 2004 4:47 pm
the utimer is for when i type `kb <nick> <ban time> it will unban them after that many seconds
But thanks anyway
DarkJFMan
Halfop
Posts: 85 Joined: Mon Dec 15, 2003 3:19 pm
Post
by DarkJFMan » Thu Jun 17, 2004 5:03 pm
More questions... for a kick script now
Code: Select all
bind pub - `k pub:kick
proc pub:kick {nick uhost hand chan arg } {
global owner
if {$nick != $owner} {
putserv "NOTICE $nick :You don't have access"
} else {
putkick $chan $arg "Kicked on request of $nick"
}
}
what i'm trying to do
} else {
set fs [open reasons.txt r]
putkick $chan $arg "gets fs $line"
}
}
does that make it read a random line from reasons.txt
DarkJFMan
Halfop
Posts: 85 Joined: Mon Dec 15, 2003 3:19 pm
Post
by DarkJFMan » Fri Jun 18, 2004 2:39 am
Code: Select all
bind pub - `k pub:kick
proc pub:kick {nick uhost hand chan arg } {
global owner
set fname "reasons.txt"
set fp [open $fname "r"]
set data [read -nonewline $fp]
close $fp
set lines [split $data "\n"]
set numlines [llength $lines]
set num [rand $numlines]
set randline [lindex $lines $num]
if {$nick != $owner} {
putserv "NOTICE $nick :You don't have access"
} else {
putkick $chan $arg "$randline"
}
}
I put code in the scripts directory and in text directory but i get this message from bot
[11:35:11pm] <DarkJFGirl> [02:33] Tcl error [pub:kick]: couldn't open "reasons.txt": no such file or directory
where exactly i'm supposed to put it
egghead
Master
Posts: 481 Joined: Mon Oct 29, 2001 8:00 pm
Contact:
Post
by egghead » Fri Jun 18, 2004 3:11 am
DarkJFMan wrote: Code: Select all
bind pub - `k pub:kick
proc pub:kick {nick uhost hand chan arg } {
global owner
set fname "reasons.txt"
set fp [open $fname "r"]
set data [read -nonewline $fp]
close $fp
set lines [split $data "\n"]
set numlines [llength $lines]
set num [rand $numlines]
set randline [lindex $lines $num]
if {$nick != $owner} {
putserv "NOTICE $nick :You don't have access"
} else {
putkick $chan $arg "$randline"
}
}
I put code in the scripts directory and in text directory but i get this message from bot
[11:35:11pm] <DarkJFGirl> [02:33] Tcl error [pub:kick]: couldn't open "reasons.txt": no such file or directory
where exactly i'm supposed to put it
Likely in the directory where the bot is started from.
DarkJFMan
Halfop
Posts: 85 Joined: Mon Dec 15, 2003 3:19 pm
Post
by DarkJFMan » Fri Jun 18, 2004 6:00 am
eggdrop is fun i just did 8ball all on my own... anyway i'm trying to edit my previous scripts
Code: Select all
bind pub - `join pub:addchan
proc pub:addchan {nick uhost hand chan text} {
global owner
set joined [lindex $text 0]
if {$nick != $owner} {
putserv "NOTICE $nick :You don't have access"
} else {
channel add $text
putserv "PRIVMSG $joined :$joined joined."
}
}
it works fine, the problem is that it's msging $joined twice any ideas why?