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.

Lastspoke Evolved v0.2 (January 23, 2o1o)

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Lastspoke Evolved v0.2 (January 23, 2o1o)

Post by speechles »

This is primarily a script by a fellow named Pistos. While it is one of the better !lastspoke scripts available it had some serious shortcomings. Primarily was the issue of it "forgetting" anyone who had parted or quit. To me this shouldn't occur as long as the bot hasn't parted or quit, because their last spoken line would still be accurate. So now it will never forgot anyone it has seen talking until it is restarted or a master/owner types !spokeclean or !cleanspoke. A small example of the added features is shown below:
* Now talking in #test
...
<speechles> !last testnick
<bot> 2 hours, 41 minutes, 2 seconds ago, testnick said 'BOO!'.

-- but later, testnick joins another channel the bot is in (obviously not #test) and chats

<speechles> !last TESTNICK
<bot> As far as I know, TESTNICK hasn't said anything. But if you meant testnick, who by the way isn't present on #test, then:
<bot> 21 seconds ago, testnick said 'BOO AGAIN!'.

<speechles> !last 7357NICK
<bot> As far as I know, 7357NICK hasn't said anything. But if you meant testnick, who by the way isn't present on #test, then:
<bot> 35 seconds ago, testnick said 'BOO AGAIN!'.

-- in the above quotes, testnick and the bot still share a common channel (which obviously isn't #test)
-- After quitting irc completely with testnick (sharing no common channels with the bot). This is the reply:

<speechles> !last 7357NICK
<bot> As far as I know, 7357NICK hasn't said anything. But if you meant testnick, who by the way isn't present on #test, then:
<bot> 49 seconds ago, testnick said 'BOO AGAIN!'. testnick is not on any channels I monitor at this time.

<speechles> !last -totals
<bot> I am presently tracking 234 nicknames (73 of them active) using approximately 8.4 KB (2.7 KB is active) of memory for 3 days, 9 hours, 51 minutes, 45 seconds.
If you ever wish to clean the spoke array (using -totals allows you to see memory consumption and when that is above your certain threshold you would use this), an owner or master simply needs to type !cleanspoke or !spokeclean and the array will be pruned to just those nicks presently active (those still in common channels with the bot).

There is no config. There is no chanset command. Simply source the script and it will start remembering everything said...
Lastspoke_Evolved enjoy and most important, have a fun :P
Last edited by speechles on Mon Jun 06, 2011 11:09 pm, edited 4 times in total.
User avatar
MenzAgitat
Op
Posts: 118
Joined: Tue Jul 04, 2006 12:35 pm
Location: France
Contact:

Post by MenzAgitat »

It goes into infinite loop when the target is on the chan and didn't said anything ever.

On chan :

Code: Select all

[17:16:01] <Boole> Aussi loin que je me souvienne, Irony`BnC n'a rien dit.  Mais si tu voulais parler de Irony`BnC, alors :
[17:16:01] <Boole> Aussi loin que je me souvienne, Irony`BnC n'a rien dit.  Mais si tu voulais parler de Irony`BnC, alors :
[17:16:02] <Boole> Aussi loin que je me souvienne, Irony`BnC n'a rien dit.  Mais si tu voulais parler de Irony`BnC, alors :
[17:16:03] <Boole> Aussi loin que je me souvienne, Irony`BnC n'a rien dit.  Mais si tu voulais parler de Irony`BnC, alors :
...
In partyline :

Code: Select all

[17:15:58] <Boole> [17:15] Warning: over maximum server queue!
[17:15:58] <Boole> [17:15] Tcl error [spoke_query]: too many nested evaluations (infinite loop?)
[17:15:59] <Boole> [17:15] -----> too many nested evaluations (infinite loop?) 
[17:15:59] <Boole> [17:15] ----->     while executing 
[17:15:59] <Boole> [17:15] -----> "string equal -nocase $member $speaker" 
[17:15:59] <Boole> [17:15] ----->     (procedure "spoke_query" line 1) 
[17:15:59] <Boole> [17:15] ----->     invoked from within 
[17:15:59] <Boole> [17:15] -----> "spoke_query $nick $uhost $handle $channel $speaker 1" 
[17:15:59] <Boole> [17:15] ----->     (procedure "spoke_query" line 1) 
[17:15:59] <Boole> [17:15] ----->     invoked from within 
[17:15:59] <Boole> [17:15] -----> "spoke_query $nick $uhost $handle $channel $speaker 1" 
[17:15:59] <Boole> [17:15] ----->     (procedure "spoke_query" line 89) 
[17:15:59] <Boole> [17:15] ----->     invoked from within 
[17:15:59] <Boole> [17:15] -----> "spoke_query $nick $uhost $handle $channel $speaker 1" 
[17:15:59] <Boole> [17:15] ----->     (procedure "spoke_query" line 89) 
[17:15:59] <Boole> [17:15] ----->     invoked from within 
...
The proc spoke_query calls itself on line 158 :

Code: Select all

spoke_query $nick $uhost $handle $channel $speaker 1
(I've translated the script but original version works the same way.)

------------------------

Edit: I just redownloaded the script from your link and I see that you fixed the bug since yesterday.

Suggestion: Wouldn't it be better to quietly correct the case when a nickname has bad case ?
like just :
As far as I know, TestNick hasn't said anything.
instead of
As far as I know, testnick hasn't said anything. But if you meant TestNick, who by the way isn't present on #chan, then:
As far as I know, TestNick hasn't said anything.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

MenzAgitat wrote:Edit: I just redownloaded the script from your link and I see that you fixed the bug since yesterday.

Suggestion: Wouldn't it be better to quietly correct the case when a nickname has bad case ?
like just :
As far as I know, TestNick hasn't said anything.
instead of
As far as I know, testnick hasn't said anything. But if you meant TestNick, who by the way isn't present on #chan, then:
As far as I know, TestNick hasn't said anything.
Let me investigate and see...
<speechles> !last testnick
<bot> As far as I know, testnick hasn't said anything.
<bot> I've been watching for 13 hours, 9 minutes, 7 seconds.

<speechles> !last TestNick
<bot> As far as I know, TestNick hasn't said anything.
<bot> I've been watching for 13 hours, 9 minutes, 29 seconds.

<speechles> !last 5p33ch135
<bot> As far as I know, 5p33ch135 hasn't said anything. But if you meant speechles, then:
<bot> 18 minutes, 13 seconds ago, speechles said 'sometimes it's fun to let people bury themselves in lies. let him keep talkin' xD'.

<speechles> !last b0t
<bot> As far as I know, b0t hasn't said anything. But if you meant bot, then:
<bot> 0 seconds ago, bot said: 'speechles, give it a rest... I'm sleeping :P'.

<speechles> !last bi11y
<bot> As far as I know, bi11y hasn't said anything. But if you meant billy, then:
<bot> As far as I know, billy hasn't said anything.
<bot> I've been watching for 13 hours, 32 minutes, 1 second.
As proof the very last query shows the problem. But this is more because the recursion is occuring and during this most of the variables are destroyed, the only thing it actually remembers is a 0 or 1 for recursion. 0 it knows it hasn't recursed yet, and a 1 means it has. The only reason it even needs to track that recursion occured is when placing the "$nick is not present on $chan" line when it already has already been mentioned before the recursion occurs.

FYI, the problem with the infinite loop is shown below:

Code: Select all

# The code below is to correct leeted-up (numbers)
# within nick searches into their real letter equivalent. The problem
# is the check if the $speaker and $member are equal, this
# should NOT match. The below code is flawed and doesn't include
# this necessary check.
if {[string equal -nocase $member [string map {1 l 2 z 3 e 4 a 5 s 6 g 7 t 9 g 0 o} $speaker]] || [string equal -nocase [string map {1 l 2 z 3 e 4 a 5 s 6 g 7 t 9 g 0 o} $member] $speaker]} {

# This includes the check that $speaker and $member are NOT the
# same as well as correcting leeted-up (numbers) in nick searches
# to real letters.
if {([string equal -nocase $member [string map {1 l 2 z 3 e 4 a 5 s 6 g 7 t 9 g 0 o} $speaker]] || [string equal -nocase [string map {1 l 2 z 3 e 4 a 5 s 6 g 7 t 9 g 0 o} $member] $speaker]) && ![string equal $member $speaker]} {
The original script had 2 checks, 1st and 3rd below. Only the 1st had the check for infinite looping. The evolved version has 4 checks and all of these include the infinite-loop check:
1st = case insensitive matches in chan
2nd = case insensitive leeted-up (number) matches in chan
3rd = case insensitive matches not in chan
4th = case insensitive leeted-up (number) matches not in chan

Feel free to make any modifications/translations/releases based upon this code. The purpose of it was merely to be useful, not for profit or glory. ;)

----

Edit: In the meantime, this shouldn't look so silly. It checks for recursion and if it still doesn't find the nickname within the spoke array will add the word "either". I'll have something better when I have more time. ;)
- billy and the bot both share a common channel
- but it is not the same one !last was made in
<speechles> !last bi11y
<bot> As far as I know, bi11y hasn't said anything. But if you meant billy, who by the way isn't present on #test, then:
<bot> As far as I know, billy hasn't said anything either.
<bot> I've been watching for 5 minutes, 12 seconds.
The same link above will get the corrected script. ;)
User avatar
MenzAgitat
Op
Posts: 118
Joined: Tue Jul 04, 2006 12:35 pm
Location: France
Contact:

Post by MenzAgitat »

 
Just downloaded the script (and translated it) again, thank you ^^

I persist to think that it would be cleaner to factorize when no information is available whatever the case (or 1337 be used or not), and to directly put the result when different case (or 1337) have available info while asked nick have not. I'll modify it that way when I have some time (and if you don't do it before :p).

Some idea to enhance your leet conversion would be to use a soundex and/or levenshtein distance to detect approximative nicks and try to match nearest syntax: see this and this.
The purpose of it was merely to be useful, not for profit or glory.
very useful indeed, as usual with your submissions ;)
 
 
Last edited by MenzAgitat on Sun Jul 26, 2009 7:46 pm, edited 1 time in total.
c
cache
Master
Posts: 306
Joined: Tue Jan 10, 2006 4:59 am
Location: Mass

Re: Lastspoke Evolved v0.1 (July 22, 2oo9)

Post by cache »

speechles wrote:This is primarily a script by a fellow named Pistos. While it is one of the better !lastspoke scripts available it had some serious shortcomings. Primarily was the issue of it "forgetting" anyone who had parted or quit. To me this shouldn't occur as long as the bot hasn't parted or quit, because their last spoken line would still be accurate. So now it will never forgot anyone it has seen talking until it is restarted or a master/owner types !spokeclean or !cleanspoke. A small example of the added features is shown below:
* Now talking in #test
...
<speechles> !last testnick
<bot> 2 hours, 41 minutes, 2 seconds ago, testnick said 'BOO!'.

-- but later, testnick joins another channel the bot is in (obviously not #test) and chats

<speechles> !last TESTNICK
<bot> As far as I know, TESTNICK hasn't said anything. But if you meant testnick, who by the way isn't present on #test, then:
<bot> 21 seconds ago, testnick said 'BOO AGAIN!'.

<speechles> !last 7357NICK
<bot> As far as I know, 7357NICK hasn't said anything. But if you meant testnick, who by the way isn't present on #test, then:
<bot> 35 seconds ago, testnick said 'BOO AGAIN!'.

-- in the above quotes, testnick and the bot still share a common channel (which obviously isn't #test)
-- After quitting irc completely with testnick (sharing no common channels with the bot). This is the reply:

<speechles> !last 7357NICK
<bot> As far as I know, 7357NICK hasn't said anything. But if you meant testnick, who by the way isn't present on #test, then:
<bot> 49 seconds ago, testnick said 'BOO AGAIN!'. testnick is not on any channels I monitor at this time.

<speechles> !last -totals
<bot> I am presently tracking 234 nicknames (73 of them active) using approximately 8.4 KB (2.7 KB is active) of memory for 3 days, 9 hours, 51 minutes, 45 seconds.
If you ever wish to clean the spoke array (using -totals allows you to see memory consumption and when that is above your certain threshold you would use this), an owner or master simply needs to type !cleanspoke or !spokeclean and the array will be pruned to just those nicks presently active (those still in common channels with the bot).

There is no config. There is no chanset command. Simply source the script and it will start remembering everything said...
Lastspoke_Evolved enjoy and most important, have a fun :P
Very nice feature.. ty
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

For those using this script, added a few minor details missing from the previous version.

New in this version:
* Logs spoke data for !last requests (this wasn't so before)
* Advanced secret channel handling

If you set your channel secret, others in that same channel with you can still use !last and see when and what you've said. For every other channel, they can only see the time you last said something. Basically using +spokesecret will lock what is actually said to only being displayable in the channel it was originally said in. Otherwise, the bot will say what you've actually said is a secret and it can't say what that is.
* partyline
<speechles> .chanset #testing +spokesecret
<sp33chy> Successfully set modes { +spokesecret } on #testing.

* in #testing, tracking a last request and knowing when to say "you" :)
<speechles> !last speechle5
<sp33chy> As far as I know, speechle5 hasn't said anything. But if you meant speechles, then:
<sp33chy> 0 seconds ago, you said, '!last speechle5'.
<speechles> hello friend
<friend> hello :)

* in #test 4 minutes later
<random_nick> !last speechles
<sp33chy> 4 minutes, 3 seconds ago, speechles said a secret. I can't tell you here. :P

* much later in #somewhere-else after speechles quits IRC (or parts all common channels with the bot. who knows? right?!)
<spy> !last 5peechles
<sp33chy> As far as I know, 5peechles hasn't said anything. But if you meant speechles, who by the way isn't present on #somewhere-else, then:
<sp33chy> 41 minutes, 18 seconds ago, speechles said a secret. I can't tell you here. :P speechles is not on any channels I monitor at this time.

* in #testing
<friend> !last 5peechles
<sp33chy> As far as I know, 5peechles hasn't said anything. But if you meant speechles, who by the way isn't present on #testing, then:
<sp33chy> 47 minutes, 43 seconds ago, speechles said, "hello friend". speechles is not on any channels I monitor at this time.
This demonstrates it both picks up the last thing said as me just then issuing the "hello friend" as well as knowing when and where to keep what I said a secret. Enjoy. :P

Download: lastspoke evolved v0.2
User avatar
spithash
Master
Posts: 248
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

This script is just AWESOME! :D

since I stopped using bseen tcl and I have gseen module now, I needed the !lastspoke command, this is just what I exactly needed!

Thank's speechles :!: :!: :!:

:wink:

Just one tiny question, when you trigger it and you press tab for nick completion, most irc clients leave a space after the nick and the script thinks it's not that nick.. is this fixable?

This is what I mean:
(17:52:24) <@spithash> !spoke spithash
(17:52:26) <@nagger> As far as I know, spithash hasn't said anything.
(17:52:27) <@nagger> I've been watching for 6 hours, 57 minutes, 41 seconds.
This was with a space after the nick, like this "spithash "

And this is without space:
(17:52:29) <@spithash> !spoke spithash
(17:52:30) <@nagger> 0 seconds ago, you said '!spoke spithash'.
Is this fixable?
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
User avatar
Trixar_za
Op
Posts: 143
Joined: Wed Nov 18, 2009 1:44 pm
Location: South Africa
Contact:

Post by Trixar_za »

Maybe try changing

Code: Select all

proc spoke_query {nick uhost handle channel arg {re 0}} {
    global spoke_time spoke_text spoke_start
    
    if {$re == 0 } { spoke_pubm $nick $uhost $handle $channel "${::lastbind} $arg" }

    if {[string match "$arg" "-totals"]} {
to

Code: Select all

proc spoke_query {nick uhost handle channel arg {re 0}} {
    global spoke_time spoke_text spoke_start
    
    if {$re == 0 } { spoke_pubm $nick $uhost $handle $channel "${::lastbind} $arg" }

     set arg [string trim $arg]

    if {[string match "$arg" "-totals"]} {
String trim will remove any spaces before or after the nickname, which should fix that bug... You have a real knack for finding them hey? ;)
User avatar
spithash
Master
Posts: 248
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

*g* thanks a LOT!!!

it worked magically! :D
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Read below.

nml375 for some reason is nazi.

Welcome to germany sir. Had no idea that wall went back up, and a hitler was rising to power...
Last edited by speechles on Mon Jun 06, 2011 11:11 pm, edited 1 time in total.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

speechles,
FYI I moderated your earlier post and sent it to the Yunk Yard. If you don't have anything constructive to say, please refrain from posting in the first place.
NML_375
l
lee8oi
Halfop
Posts: 63
Joined: Sat Jun 04, 2011 2:05 pm
Location: Michigan,United States.
Contact:

Post by lee8oi »

(Edited this Post - lee8oi) Moving on. Not worth my time. Good luck to you sir and your scripts.
Last edited by lee8oi on Tue Jun 07, 2011 2:49 am, edited 1 time in total.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Good. Thanks guy with 8 in his nickname for...

I dunno what...

Giving me a good laugh. Thanks for that.

Feel, I feel nothing. I saw some guy I posted in his thread, delete it. Blame nml375 for rash edits. This leads to confusion and me assuming you the idiot. Seems I was wrong. I will now point the finger in the proper direction. Sometimes in trying to do right, the person does things wrong. Nml375 is to blame. I can't post in threads he's helping a dude in. Oh no, it's not constuctive. His panties get all in a bunch and he has to "protect" the forums against me.

For some reason, this is the problem. Use a softer touch nml375. Keep yourself from becoming the center of arguments because you want to stop them. All this does is reinforce my point.

I'm one of the dudes asked, why isnt nml375 a mod? Now I'm asking, why does he need to be such a dick? I know why.... But does he? I'm asking questions...
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

speechles,
If you have issues with my actions as a moderator, you are free to bring your concerns to me, the other moderators, and/or slennox. If you prefer to vent your frustrations OT, by all means - go ahead, though it's less likely to come to the attention of the other moderators/slennox..
If you prefer to call me names, fine - that's your choice... Don't expect me to care much over it though.

To the points though.. You are more than welcome to pitch in on any thread I've contributed to. I've never denied you, or anyone else, that. When I deem posts as inappropriate, however, I am expected to take actions. When I do take actions, I generally tag/mark the post with details as to the action taken. In this very specific action, I unfortunately overlooked that - hence the notice here roughly 30 minutes later.

I generally refrain from taking actions should I become involved in a discussion, as to separate my roles as contributor and moderator. In this case there was no discussion, only a post by you ridiculing another forum member while blatantly advertising a script of your interest.

You say I should use a softer touch, yet most of the times I see you posting corrections or fixes they come with a mocking...

You imply that I'm intolerant, yet you go out guns blazing after I've moderated one (1) of your posts...

You were indeed one of those who recommended me as a moderator, and for that I am grateful. However, I will not treat you any differently than other forum members. When you make good contributions I will acknowledge that, when you post out of line I will take actions...
NML_375
Post Reply