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.

moxquizz

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
Thanhas
Op
Posts: 124
Joined: Sat Sep 02, 2006 11:14 am
Location: Ottawa, Canada

moxquizz

Post by Thanhas »

Code: Select all


-----------------------------
[b]# mini funstuff
bind pub - !hi moxquiz_pub_hi
bind ctcp - action moxquiz_purr[/b]
------------------------------

# say Hi to "known" users
proc moxquiz_purr {nick host handle channel action arg} {
    global quizconf allstarsarray

    # [pending] translate this
    set tlist [list "purrs." \
                   "meows." \
                   "happily hops around."]

    if {$action == "ACTION" && arg == "pats $botnick" &&
        [mx_str_ieq $channel $quizconf(quizchannel)] &&
        ([validuser $handle] || [info exists allstarsarray($nick)]) } {
        mxirc_action $quizconf(quizchannel) [lindex $tlist [rand [llength $tlist]]]
    }
}

Errer is on action when someone type /me anything the BOT in has DCC type

Tcl error [moxquiz_purr]: syntax error in expression "$action == "ACTION" && arg == "pats $botnick" &&



i hope someone will find the reason of Errer i try my best on it
regards
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Your missing the $ before arg:

Code: Select all

if {$action == "ACTION" && $arg == "pats $botnick" && [mx_str_ieq $channel $quizconf(quizchannel)] && ([validuser $handle] || [info exists allstarsarray($nick)]) } {
r0t3n @ #r0t3n @ Quakenet
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

the problem is afaik mainly the unescaped newline. I bypassed by simply putting it into one line:

Code: Select all

    if {$action == "ACTION" && $arg == "pats $botnick" && [mx_str_ieq $channel $quizconf(quizchannel)] && ([validuser $handle] || [info exists allstarsarray($nick)]) } {
        mxirc_action $quizconf(quizchannel) [lindex $tlist [rand [llength $tlist]]]
    }
PS: I sent in this fix more than a year ago to the creator... but either email failed or he nolonger responds to them :D.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
Thanhas
Op
Posts: 124
Joined: Sat Sep 02, 2006 11:14 am
Location: Ottawa, Canada

Thanks

Post by Thanhas »

Thanks it works thanks alot
Regards
User avatar
Thanhas
Op
Posts: 124
Joined: Sat Sep 02, 2006 11:14 am
Location: Ottawa, Canada

heay

Post by Thanhas »

it was fine but suddenly i see this Errer 2 :( don't know where shuold i FIND the prob.,.,.,.,.,

Errer
-------------------------------------------------------------------
Tcl error [moxquiz_purr]: can't read "botnick": no such variable
--------------------------------------------------------------------
## Version:
set version_moxquizz "0.8.1"

package require msgcat

namespace import -force msgcat::*

###########################################################################
##
## ATTENTION:
##
## Defaults for bot configuration. Don't edit here, edit the file
## moxquizz.rc instead!
##
###########################################################################


# system stuff
variable quizbasedir moxquizz
variable datadir $quizbasedir/quizdata
variable configfile $quizbasedir/moxquizz.rc
variable intldir $quizbasedir/intl

variable rankfile $datadir/rank.data
variable allstarsfile $datadir/rankallstars.data
variable statsfile $datadir/stats.data
variable userqfile $datadir/questions.user.new
variable commentsfile $datadir/comments.txt

variable quizhelp

# these will be searched in $intldir/$quizconf(language)
variable channeltipfile channeltips.txt
variable channelrulesfile channelrules.txt
variable pricesfile prices.txt
variable helpfile help.txt
what am i do ?
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Add:

Code: Select all

global botnick
After the:
global quizconf allstarsarray
line
r0t3n @ #r0t3n @ Quakenet
User avatar
Thanhas
Op
Posts: 124
Joined: Sat Sep 02, 2006 11:14 am
Location: Ottawa, Canada

i don't know why i can'

Post by Thanhas »

i don't know why its not pasting all ?
User avatar
Thanhas
Op
Posts: 124
Joined: Sat Sep 02, 2006 11:14 am
Location: Ottawa, Canada

sorry

Post by Thanhas »

# say Hi to "known" users
proc moxquiz_purr {nick host handle channel action arg} {
global quizconf allstarsarray
global botnick
# [pending] translate this
set tlist [list "purrs." \
"meows." \
"happily hops around."]

if {$action == "ACTION" && $arg == "pats $botnick" &&
[mx_str_ieq $channel $quizconf(quizchannel)] &&
([validuser $handle] || [info exists allstarsarray($nick)]) } {
mxirc_action $quizconf(quizchannel) [lindex $tlist [rand [llength $tlist]]]
}
}
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

You do not edit any Tcl file you edit the .rc file as per instructions.
## Defaults for bot configuration. Don't edit here, edit the file
## moxquizz.rc instead!
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Post Reply