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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
area57
Voice
Posts: 7 Joined: Wed Jan 17, 2007 4:50 pm
Post
by area57 » Thu Mar 01, 2007 8:13 pm
Hello,
i would like to have a script, where the Channelusers can correct the orthography in the chat.
i.e.
[*User1] ersetz test
[*User2] s/test/done
[Bot] User1 would you like to say: ersetz done?
i know that the egg-fu script has it for change the learnd text, but my try's to take the code running was not good so the Bot is dieing -.-
i hope you understand my request
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Fri Mar 02, 2007 2:25 pm
the only real solution for something like that I could think of is:
Code: Select all
setudef flag correct
bind PUBM -|- * eval:text
proc eval:text {nickname hostname handle channel arguments} {
global lastline;
if {![channel get $channel correct]} {
return 0;
}
if {![info exists lastline($nickname)]} {
set lastline($nickname) $arguments;
return 0;
}
if {[regexp {s/(.*)/(.*)} $arguments -> original new]} {
set line [string map [list $original $new] $lastline($nickname)];
putserv "PRIVMSG $channel :$nickname: did you mean $line?"
return 0;
}
set lastline($nickname) $arguments;
}
[untested]
Last edited by
metroid on Sat Mar 03, 2007 8:38 am, edited 1 time in total.
area57
Voice
Posts: 7 Joined: Wed Jan 17, 2007 4:50 pm
Post
by area57 » Fri Mar 02, 2007 6:36 pm
Hi,
I have tested your script, but it doesn't work
there is no error message or something in the partyline or channel
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Sat Mar 03, 2007 6:36 am
did you use .chanset #channel +correct?
area57
Voice
Posts: 7 Joined: Wed Jan 17, 2007 4:50 pm
Post
by area57 » Sat Mar 03, 2007 7:48 am
metroid wrote: did you use .chanset #channel +correct?
No i didn't see it
now i get an error message in the Partyline:
Tcl error [eval:text]: can't read "chan": no such variable
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sat Mar 03, 2007 7:51 am
Replace $chan with $channel.
area57
Voice
Posts: 7 Joined: Wed Jan 17, 2007 4:50 pm
Post
by area57 » Sun Mar 04, 2007 5:03 pm
Ok that works with $channel
but there is a problem if a User posts an url contains anything with "s/" in the url.
And another question, is it possible to change the script so that
all users can correct a posted line from another user on more than one line?
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun Mar 04, 2007 7:50 pm
area57 wrote: Ok that works with $channel
but there is a problem if a User posts an url contains anything with "s/" in the url.
What is the problem?
Be clear in your requests please.