View previous topic :: View next topic |
Author |
Message |
CrazyCat Owner

Joined: 13 Jan 2002 Posts: 991 Location: France
|
|
Back to top |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Mon Apr 12, 2021 5:19 pm Post subject: |
|
|
Awesome work CrazyCat, as always  _________________ ComputerTech |
|
Back to top |
|
 |
skydrome Voice
Joined: 05 Apr 2021 Posts: 1
|
Posted: Wed Apr 28, 2021 3:53 am Post subject: |
|
|
Hello, Im confused as how the script sends the messages to the bots by its username.
My bot's user handles are theyre nicks and they have different usernames so [islinked $bot] is always false
Should i .+bot in a different manner? |
|
Back to top |
|
 |
CrazyCat Owner

Joined: 13 Jan 2002 Posts: 991 Location: France
|
Posted: Wed Apr 28, 2021 11:06 am Post subject: |
|
|
Well, I did the script with the assertion that the bots are added using their username, which is often their botnet-nick too.
The better way is to make chanrelay working is to do the .+bot <username> when creating your botnet.
Note that the bot handle is just informative.
If you have troubles to set up chanrelay, I can make an adapted version of it for particular cases  _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
Back to top |
|
 |
vam2u Voice

Joined: 27 Mar 2021 Posts: 20 Location: Malaysia
|
Posted: Fri May 07, 2021 8:38 am Post subject: |
|
|
I'm having below error:-
Hope to get some help or advice on how to resolve it
Thanks!
Code: |
[06:40:45] Tcl error [::crelay::trans:topic]: expected integer but got "GREGORIAN_CHANGE_DATE"
[06:41:01] Tcl error [::crelay::trans:join]: expected integer but got "GREGORIAN_CHANGE_DATE"
[06:41:01] Tcl error [::crelay::trans:topic]: expected integer but got "GREGORIAN_CHANGE_DATE"
[06:41:01] Tcl error [::crelay::trans:pub]: expected integer but got "GREGORIAN_CHANGE_DATE"
[06:41:14] Tcl error [::crelay::trans:join]: expected integer but got "GREGORIAN_CHANGE_DATE"
[06:41:14] Tcl error [::crelay::trans:topic]: expected integer but got "GREGORIAN_CHANGE_DATE"
[06:42:09] Tcl error [::crelay::trans:part]: expected integer but got "GREGORIAN_CHANGE_DATE"
|
|
|
Back to top |
|
 |
CrazyCat Owner

Joined: 13 Jan 2002 Posts: 991 Location: France
|
Posted: Fri May 07, 2021 9:31 am Post subject: |
|
|
Please do a .set errorInfo in party-line just after having the error, it will give more informations about it
The error could be in the dlog procedure, you can try to set debug to 0 _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
Back to top |
|
 |
vam2u Voice

Joined: 27 Mar 2021 Posts: 20 Location: Malaysia
|
Posted: Fri May 07, 2021 9:41 am Post subject: |
|
|
Hey CrazyCat, thanks for your prompt reply.
Here you go:-
Code: |
Currently: expected integer but got "GREGORIAN_CHANGE_DATE"
Currently: while executing
Currently: "GetDateFields $clockval $TZData($timezone) GREGORIAN_CHANGE_DATE"
Currently: (procedure "::tcl::clock::formatproc'%Y-%m-%d %H\:%M\:%S'c" line 4)
Currently: invoked from within
Currently: "$procName $clockval $timezone"
Currently: (procedure "::tcl::clock::format" line 34)
Currently: invoked from within
Currently: "clock format [clock seconds] -format "%Y-%m-%d %H:%M:%S""
Currently: (procedure "dlog" line 3)
Currently: invoked from within
Currently: "dlog "Prepare transmission : >quit $chan $nick $text" "
Currently: (procedure "::crelay::trans:quit" line 2)
Currently: invoked from within
Currently: "::crelay::trans:quit $_stnm1 $_stnm2 $_stnm3 $_stnm4 $_stnm5"
|
|
|
Back to top |
|
 |
CrazyCat Owner

Joined: 13 Jan 2002 Posts: 991 Location: France
|
Posted: Fri May 07, 2021 9:44 am Post subject: |
|
|
Ok, it a trouble with the clock, so disable the debug.
I'll try to find a solution, this seems to be a known trouble with tcl _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
Back to top |
|
 |
CrazyCat Owner

Joined: 13 Jan 2002 Posts: 991 Location: France
|
Posted: Fri May 07, 2021 9:58 am Post subject: |
|
|
Ok, solution found
replace the actual i18n proc with the following:
Code: | proc i18n {msgfile {lang {}} } {
if {$lang == ""} {set lang [string range [::msgcat::mclocale] 0 1] }
if { [catch {open $msgfile r} fmsg] } {
putlog "\002ChanRelay\002 - Could not open $msgfile for reading\n$fmsg"
} else {
putlog "\002ChanRelay\002 - Loading $lang file from $msgfile"
while {[gets $fmsg line] >= 0} {
lappend ll $line
}
close $fmsg
::msgcat::mcmset $lang [join $ll]
unset ll
}
::msgcat::mclocale $lang
# Hack for badly managed locales
if { [::msgcat::mc GREGORIAN_CHANGE_DATE] == "GREGORIAN_CHANGE_DATE"} {
::msgcat::mcset [::msgcat::mclocale] GREGORIAN_CHANGE_DATE 2299527
}
} |
The trouble came from a trouble in msgcat and some timezones which are badly managed, I wonder you setted a language which is not in the original list  _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
Back to top |
|
 |
vam2u Voice

Joined: 27 Mar 2021 Posts: 20 Location: Malaysia
|
Posted: Fri May 07, 2021 10:04 am Post subject: |
|
|
Yeah the error is gone when I disable the debug, thanks!
But let's see if I'm able to get the relay to work  |
|
Back to top |
|
 |
vam2u Voice

Joined: 27 Mar 2021 Posts: 20 Location: Malaysia
|
Posted: Fri May 07, 2021 10:07 am Post subject: |
|
|
Wow that's fast you found the solution, I set the language to "english" |
|
Back to top |
|
 |
vam2u Voice

Joined: 27 Mar 2021 Posts: 20 Location: Malaysia
|
Posted: Fri May 07, 2021 10:31 am Post subject: |
|
|
I have replace the actual i18n proc with the following, but I still get the same error if I change back the debug mode to 1.
Code: |
[09:27:06] Tcl error [::crelay::trans:pub]: expected integer but got "GREGORIAN_CHANGE_DATE"
[09:27:47] Tcl error [::crelay::trans:quit]: expected integer but got "GREGORIAN_CHANGE_DATE"
|
|
|
Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3740 Location: Mint Factory
|
Posted: Fri May 07, 2021 10:41 am Post subject: |
|
|
Followed the error to the mc proc and I fail to understand what's is it's purpose.
Code: |
proc mc {text {str ""} args} { return [format $text $str $args] }
|
given that it's use is:
Code: |
if { [::msgcat::mc GREGORIAN_CHANGE_DATE] == "GREGORIAN_CHANGE_DATE"} {
::msgcat::mcset [::msgcat::mclocale] GREGORIAN_CHANGE_DATE 2299527
}
|
Care to shed some light on it? _________________ Once the game is over, the king and the pawn go back in the same box. |
|
Back to top |
|
 |
CrazyCat Owner

Joined: 13 Jan 2002 Posts: 991 Location: France
|
Posted: Fri May 07, 2021 12:02 pm Post subject: |
|
|
If you setted english as lang, the error must not occure. And even if you don't have the english locale (I doubt of this), the hack I did must correct that.
BTW, I'll look a little bit more.
@vam2u: can you reload the script (.tcl source scripts/chanrelay.tcl) and copy here the message about the lang loading ?
@caesar: the proc I create is to fake msgcat when the package is not available (just return format without translation).
The hack I did in i18n is not applied if msgcat is absent, as i18n is called if the catch works.
Three cases occures:
1. msgcat is here and the locale is ok, the translation is done with msgcat
2. msgcat is absent, there is no translation and a simple format is applied
3. msgcat is here but the locale is missing/unknown, I force the GREGORIAN_CHANGE_DATE to the most used value _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
Back to top |
|
 |
vam2u Voice

Joined: 27 Mar 2021 Posts: 20 Location: Malaysia
|
Posted: Fri May 07, 2021 11:23 pm Post subject: |
|
|
@CrazyCat
Here you go, below is the message i get.
.tcl source scripts/chanrelay.tcl
[22:03:04] CHANRELAY 4.00 by CrazyCat loaded - https://www.eggdrop.fr
Tcl: |
|
Back to top |
|
 |
|