| View previous topic :: View next topic |
| Author |
Message |
Hellcat Voice
Joined: 01 Oct 2008 Posts: 1
|
Posted: Wed Oct 01, 2008 8:23 am Post subject: Increase length of infoline (greet)? |
|
|
Hello everyone
I finally started setting up (my very first ever) EggDrop BOT....
So far it looks working pretty nicely like what I wanted to have
Now comes the "but"
I also enabled +greet on my channel and users known to the bot that have an infoline trigger the greet, all look fine.
But the greet messages are cut off after 93 chars. They are already saved cut off in the user file.
What do I have to do to increase the max. length of the greet messages / info lines?
Thanx  |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Sat Oct 11, 2008 1:27 pm Post subject: |
|
|
I haven't been able to look over the eggdrop source code recently to check for a way to "change" the info line lenght, so i wrote a quick solution. The only testing i've done thou, is to see if XTRA user fields would allow alot of chars and since i got up to 105 chars. I thought it would work, so please let me know how it goes. | Code: | if {![info exists whois-fields]} {
set whois-fields "GREET"
} elseif {(![regexp -- {(GREET)} "$whois-fields"])} {
append whois-fields " GREET"
}
bind dcc -|- +greet add_greet:dcc
bind dcc -|- -greet del_greet:dcc
bind dcc m|- chgreet chg_greet:dcc
proc add_greet {handle idx text} {
if {([llength $text] == 0)} {putdcc $idx "Usage: +greet <greet-line>"; return 1}
set index 0; set end "end"; set newgreet [join [lrange $text $index $end]]; set oldgreet [getuser $handle XTRA GREET]
if {([llength $oldgreet] == "") && ([string match -nocase "none" "$newgreet"])} {putdcc $idx "No greet has been set."; return 1}
elseif {([llength $oldgreet] != "") && ([string match -nocase "none" "$newgreet"])} {setuser $handle XTRA GREET ""; putdcc $idx "Your info line has been cleared."; return 1}
elseif {([llength $oldgreet] == "") && (![string match -nocase "none" "$newgreet"])} {setuser $handle XTRA GREET "$newgreet"; putdcc $idx "Your info line has been set to: $newgreet"; return 1}
elseif {([llength $oldgreet] != "") && (![string match -nocase "none" "$newgreet"])} {setuser $handle XTRA GREET "$newgreet"; putdcc $idx "You info line has been changed to: $newgreet"; return 1}
}
proc del_greet {handle idx text} {
set oldgreet [getuser $handle XTRA GREET]
if {([llength $oldgreet] == "")} {putdcc $idx "No greet is currently set."; return 1}
else {setuser $handle XTRA GREET ""; putdcc $idx "Your info line has been cleared"; return 1}
}
proc chg_greet {handle idx text} {
if {([llength $text] == 0)} {putdcc $idx "Usage: chgreet <handle> \[new greet-line\]"; return 1}
set index 0; set end "end"
set hand [lindex $text $index]
if {(![validuser $hand])} {putdcc $idx "sorry, i dont know $hand"; return 1}
else {
set index [expr $index +1]
set newgreet [join [lrange $text $index $end]]
if {([llength $newgreet] == "")} {putdcc $idx "Usage: chgreet <handle> \[new greet-line\]"; return 1}
if {([string match -nocase "none" "$newgreet"])} {setuser $hand XTRA GREET ""; putdcc $idx "info line for $hand has been cleared."; return 1}
else {setuser $hand XTRA GREET "$newgreet"; putdcc $idx "info line for $hand has been set to: $newgreet"; return 1}
}
}
bind join -|- "* *" greet:join
proc greet:join {nick host handle channel} {
if {(![isbotnick $nick]) && ([validuser $handle]) && ([validchan $channel]) && ([channel get $channel greet] == "+") && ([getuser $handle XTRA GREET] != "")} {
puthelp "PRIVMSG $channel :\[$nick\] [getuser $handle XTRA GREET]"
return
}
} | Once its loaded, just use | Quote: | .+greet <new greet line> - to set your self a greet line.
.-greet - to unset your self a greet line.
.chgreet <handle> <greet line> - to set someone else's greet line.
You can use the word 'none' as a greet line to remove (clear) a greet line.
It will be global, so any channel that has '+greet' channel option set it will display
a person's greet if they have one when they join the channel. This will currently happen "every" time
they join the channel. | Good luck  _________________ TCL the misunderstood |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|