Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Karma issue with -- #46

Open
voidzero opened this issue Feb 15, 2024 · 9 comments
Open

Karma issue with -- #46

voidzero opened this issue Feb 15, 2024 · 9 comments

Comments

@voidzero
Copy link

voidzero commented Feb 15, 2024

Something really weird and I can't find the cause: for some reason, words longer than 5 characters that get de-karma'd (e.g. foobar--) aren't caught. I put a putlog "I AM HERE!!" in the bMotion_plugin_complex_minmin_catcher proc, but it doesn't even get there. I tried everything - when I replace the -{2} with e.g. q{2} it does reach the proc. Mysterious! Care to take a glance at this? I'm out of clues.

<voidzero> fooba--
<@Doug> Karma for 'fooba': -3.
<voidzero> foobar--
*crickets*
@jamesoff
Copy link
Owner

Hmm I can't reproduce that

1806.16 [  JamesOff] fooba--
1806.19 [   NoTopic] karma for fooba is now -1
1806.27 [  JamesOff] foobar--
1806.32 [   NoTopic] karma for foobar is now -1

@jamesoff
Copy link
Owner

Out of interest what version of eggdrop/TCL is your bot?

[13:08:20] #JamesOff# status
I am NoTopic, running eggdrop v1.8.3: 307 users (mem: 740k).
...
Tcl library: /usr/local/lib/tcl8.7
Tcl version: 8.7a5 (header version 8.7a1)

@Lord255
Copy link

Lord255 commented Feb 16, 2024

works nice on my side too.

[2024-02-16 13:48:05] <Lord255> foooobarrarw--
[2024-02-16 13:48:10] <Lord255> foooobarrar--
[2024-02-16 13:48:14] <alpha-0000> Karma for foooobarrar is now -2.

11 char is fine, 12 not. :)
i don't know where that 11 comes from.

ircd: (unreal)
MAXNICKLEN=30

egg.conf
set nick-len 25

egg and tcl details:

I am alpha-0000, running eggdrop v1.9.5+python: 1 user (mem: 16225k).
Tcl library: /usr/share/tcltk/tcl8.6
Tcl version: 8.6.12 (header version 8.6.12)

@roughnecks
Copy link

for me it also stops working at 11 chars:

[14:08] @roughne+| foobar--
[14:08] copernic+| karma for foobar is now -2
[14:08] @roughne+| foobar1--
[14:08] copernic+| Karma for foobar1 is now -2.
[14:08] @roughne+| foobar12--
[14:08] copernic+| karma for foobar12 is now -2
[14:08] @roughne+| foobar123--
[14:08] copernic+| karma for foobar123 is now -2
[14:08] @roughne+| foobar1234--
[14:08] copernic+| Karma for foobar1234 is now -1.
[14:09] @roughne+| foobar12345--
I am running eggdrop v1.9.5, on Linux 6.1.0-18-cloud-amd64.

14:06 | <copernico> | Tcl library: /usr/share/tcltk/tcl8.6
14:06 | <copernico> | Tcl version: 8.6.13 (header version 8.6.13)
14:06 | <copernico> | Tcl is threaded.
14:06 | <copernico> | TLS support is enabled.
14:06 | <copernico> | TLS library: OpenSSL 3.0.11 19 Sep 2023 (header version OpenSSL 3.0.9 30 May 2023)
14:06 | <copernico> | IPv6 support is enabled.
14:06 | <copernico> | Threaded DNS core is enabled.

@voidzero
Copy link
Author

For me:

17:00 <Doug> Tcl library: /usr/share/tcltk/tcl8.6
17:00 <Doug> Tcl version: 8.6.9 (header version 8.6.9)
17:00 <Doug> Tcl is threaded.

The length makes no sense: why does it only happen with --? ++ works fine. And if I replace the -- with other chars (for example qq) then it does enter the proc, revealed if I do .console +12 on the partyline..

@jamesoff
Copy link
Owner

Yeah it's all very weird, including the extra issues reported above. I was wondering if the -- is getting interpreted as an option or something but that doesn't really make sense given it's at the end of the word not the start (and would be odd anyway).

I guess there's no other useful clues on the partyline either? (+d1234 will get you everything bMotion will output to)

@voidzero
Copy link
Author

Well, let's see:

In the channel #:

<voidzero> foobar--

On the partyline:


17:19 <Doug> [16:19:12] (4)bMotion:      entering bMotion_event_main with nick: voidzero host: [email protected] handle: voidzero chan: # text: foobar--
17:19 <Doug> [16:19:12] (4)bMotion:     bMotion_queue_dupecheck foobar--
17:19 <Doug> [16:19:12] (2)bMotion:    Saving plugin setting lasttalk,#,_ -> 0 (from plugin system:join)
17:19 <Doug> [16:19:12] (1)bMotion:  Checking if I spoke last in #
17:19 <Doug> [16:19:12] (1)bMotion:  Cache(last) for # is 0
17:19 <Doug> [16:19:12] (3)bMotion:    bMotion_plugin_find_simple: text = foobar, lang = en
17:19 <Doug> [16:19:12] (4)bMotion:     matched complex:knockknock2, chance is 150.0, c is 86
17:19 <Doug> [16:19:12] (4)bMotion:     chance is high enough, adding bMotion_plugin_complex_knock2
17:19 <Doug> [16:19:12] (4)bMotion:     matched complex:snap, chance is 150.0, c is 37
17:19 <Doug> [16:19:12] (4)bMotion:     chance is high enough, adding bMotion_plugin_complex_snap
17:19 <Doug> [16:19:12] (1)bMotion:  going to run plugins: bMotion_plugin_complex_knock2 bMotion_plugin_complex_snap
17:19 <Doug> [16:19:12] (1)bMotion:   doing flood for bMotion_plugin_complex_knock2...
17:19 <Doug> [16:19:12] (1)bMotion:   `- running callback bMotion_plugin_complex_knock2
17:19 <Doug> [16:19:12] (1)bMotion:   plugin complex:knock tried to get non-existent value who,#,_
17:19 <Doug> [16:19:12] (2)bMotion:   returned from bMotion_plugin_complex_knock2
17:19 <Doug> [16:19:12] (2)bMotion:   Added #:complex:bMotion_plugin_complex_knock2 to plugin history
17:19 <Doug> [16:19:12] (1)bMotion:   doing flood for bMotion_plugin_complex_snap...
17:19 <Doug> [16:19:12] (1)bMotion:   `- running callback bMotion_plugin_complex_snap
17:19 <Doug> [16:19:12] (2)bMotion:    Saving plugin setting #,_,text -> foobar (from plugin complex:snap)
17:19 <Doug> [16:19:12] (2)bMotion:    Saving plugin setting #,_,nick -> voidzero (from plugin complex:snap)
17:19 <Doug> [16:19:12] (2)bMotion:    Saving plugin setting #,_,time -> 1708100352 (from plugin complex:snap)
17:19 <Doug> [16:19:12] (2)bMotion:   returned from bMotion_plugin_complex_snap
17:19 <Doug> [16:19:12] (2)bMotion:   Added #:complex:bMotion_plugin_complex_snap to plugin history

In the channel:

<voidzero> foobar++

On the partyline:

17:21 <Doug> [16:21:16] (4)bMotion:      entering bMotion_event_main with nick: voidzero host: [email protected] handle: voidzero chan: # text: foobar++
17:21 <Doug> [16:21:16] (4)bMotion:     bMotion_queue_dupecheck foobar++
17:21 <Doug> [16:21:16] (2)bMotion:    Saving plugin setting lasttalk,#,_ -> 0 (from plugin system:join)
17:21 <Doug> [16:21:16] (1)bMotion:  Checking if I spoke last in #
17:21 <Doug> [16:21:16] (1)bMotion:  Cache(last) for # is 0
17:21 <Doug> [16:21:16] (3)bMotion:    bMotion_plugin_find_simple: text = foobar++, lang = en
17:21 <Doug> [16:21:16] (4)bMotion:     matched complex:knockknock2, chance is 150.0, c is 96
17:21 <Doug> [16:21:16] (4)bMotion:     chance is high enough, adding bMotion_plugin_complex_knock2
17:21 <Doug> [16:21:16] (4)bMotion:     matched complex:plusplus-catch, chance is 150.0, c is 97
17:21 <Doug> [16:21:16] (4)bMotion:     chance is high enough, adding bMotion_plugin_complex_plusplus_catcher
17:21 <Doug> [16:21:16] (4)bMotion:     matched complex:snap, chance is 150.0, c is 50
17:21 <Doug> [16:21:16] (4)bMotion:     chance is high enough, adding bMotion_plugin_complex_snap
17:21 <Doug> [16:21:16] (1)bMotion:  going to run plugins: bMotion_plugin_complex_knock2 bMotion_plugin_complex_plusplus_catcher bMotion_plugin_complex_snap
17:21 <Doug> [16:21:16] (1)bMotion:   doing flood for bMotion_plugin_complex_knock2...
17:21 <Doug> [16:21:16] (1)bMotion:   `- running callback bMotion_plugin_complex_knock2
17:21 <Doug> [16:21:16] (1)bMotion:   plugin complex:knock tried to get non-existent value who,#,_
17:21 <Doug> [16:21:16] (2)bMotion:   returned from bMotion_plugin_complex_knock2
17:21 <Doug> [16:21:16] (2)bMotion:   Added #:complex:bMotion_plugin_complex_knock2 to plugin history
17:21 <Doug> [16:21:16] (1)bMotion:   doing flood for bMotion_plugin_complex_plusplus_catcher...
17:21 <Doug> [16:21:16] (1)bMotion:   `- running callback bMotion_plugin_complex_plusplus_catcher
17:21 <Doug> [16:21:16] (2)bMotion:   returned from bMotion_plugin_complex_plusplus_catcher
17:21 <Doug> [16:21:16] (2)bMotion:   Added #:complex:bMotion_plugin_complex_plusplus_catcher to plugin history
17:21 <Doug> [16:21:16] (1)bMotion:   doing flood for bMotion_plugin_complex_snap...
17:21 <Doug> [16:21:16] (1)bMotion:   `- running callback bMotion_plugin_complex_snap
17:21 <Doug> [16:21:16] (2)bMotion:    Saving plugin setting #,_,text -> foobar++ (from plugin complex:snap)
17:21 <Doug> [16:21:16] (2)bMotion:    Saving plugin setting #,_,nick -> voidzero (from plugin complex:snap)
17:21 <Doug> [16:21:16] (2)bMotion:    Saving plugin setting #,_,time -> 1708100476 (from plugin complex:snap)
17:21 <Doug> [16:21:16] (2)bMotion:   returned from bMotion_plugin_complex_snap
17:21 <Doug> [16:21:16] (2)bMotion:   Added #:complex:bMotion_plugin_complex_snap to plugin history

@voidzero
Copy link
Author

When doing foo--:

17:25 <Doug> [16:25:24] (4)bMotion:      entering bMotion_event_main with nick: voidzero host: [email protected] handle: voidzero chan: # text: foo--
17:25 <Doug> [16:25:24] (4)bMotion:     bMotion_queue_dupecheck foo--
17:25 <Doug> [16:25:24] (2)bMotion:    Saving plugin setting lasttalk,#,_ -> 0 (from plugin system:join)
17:25 <Doug> [16:25:24] (1)bMotion:  Checking if I spoke last in #
17:25 <Doug> [16:25:24] (1)bMotion:  Cache(last) for # is 0
17:25 <Doug> [16:25:24] (3)bMotion:    bMotion_plugin_find_simple: text = foo--, lang = en
17:25 <Doug> [16:25:24] (4)bMotion:     matched complex:knockknock2, chance is 150.0, c is 98
17:25 <Doug> [16:25:24] (4)bMotion:     chance is high enough, adding bMotion_plugin_complex_knock2
17:25 <Doug> [16:25:24] (4)bMotion:     matched complex:minmin-catch, chance is 150.0, c is 39
17:25 <Doug> [16:25:24] (4)bMotion:     chance is high enough, adding bMotion_plugin_complex_minmin_catcher
17:25 <Doug> [16:25:24] (4)bMotion:     matched complex:snap, chance is 150.0, c is 10
17:25 <Doug> [16:25:24] (4)bMotion:     chance is high enough, adding bMotion_plugin_complex_snap
17:25 <Doug> [16:25:24] (1)bMotion:  going to run plugins: bMotion_plugin_complex_knock2 bMotion_plugin_complex_minmin_catcher bMotion_plugin_complex_snap
17:25 <Doug> [16:25:24] (1)bMotion:   doing flood for bMotion_plugin_complex_knock2...
17:25 <Doug> [16:25:24] (1)bMotion:   `- running callback bMotion_plugin_complex_knock2
17:25 <Doug> [16:25:24] (1)bMotion:   plugin complex:knock tried to get non-existent value who,#,_
17:25 <Doug> [16:25:24] (2)bMotion:   returned from bMotion_plugin_complex_knock2
17:25 <Doug> [16:25:24] (2)bMotion:   Added #:complex:bMotion_plugin_complex_knock2 to plugin history
17:25 <Doug> [16:25:24] (1)bMotion:   doing flood for bMotion_plugin_complex_minmin_catcher...
17:25 <Doug> [16:25:24] (1)bMotion:   `- running callback bMotion_plugin_complex_minmin_catcher
17:25 <Doug> [16:25:24] I AM HERE!!!
17:25 <Doug> [16:25:24] (2)bMotion:   returned from bMotion_plugin_complex_minmin_catcher
17:25 <Doug> [16:25:24] (2)bMotion:   Added #:complex:bMotion_plugin_complex_minmin_catcher to plugin history
17:25 <Doug> [16:25:24] (1)bMotion:   doing flood for bMotion_plugin_complex_snap...
17:25 <Doug> [16:25:24] (1)bMotion:   `- running callback bMotion_plugin_complex_snap
17:25 <Doug> [16:25:24] (2)bMotion:    Saving plugin setting #,_,text -> foo-- (from plugin complex:snap)
17:25 <Doug> [16:25:24] (2)bMotion:    Saving plugin setting #,_,nick -> voidzero (from plugin complex:snap)
17:25 <Doug> [16:25:24] (2)bMotion:    Saving plugin setting #,_,time -> 1708100724 (from plugin complex:snap)
17:25 <Doug> [16:25:24] (2)bMotion:   returned from bMotion_plugin_complex_snap
17:25 <Doug> [16:25:24] (2)bMotion:   Added #:complex:bMotion_plugin_complex_snap to plugin history

@jamesoff
Copy link
Owner

Cheers. Will continue poking at it. Seems everyone else is on TCL 8.6, will see about building a bot with that too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants