Code: Select all
nick is "www.mysitecom/?u=1234" ~bla@myhost.com
i need this info to make a matchattr
thanks
Code: Select all
nick is "www.mysitecom/?u=1234" ~bla@myhost.com
Code: Select all
bind raw - 311 uw:RAW311
proc uw:RAW311 {from keyword args} {
set args [lindex $args]
putlog "TEST $args"
}
Code: Select all
TEST {botnick nick ~bla myhost.com * :www.mysitecom/?u=1234}
Code: Select all
www.mysitecom/?u=1234
Code: Select all
set i [expr [string first " :" $text] + 1]
set info [string range $text $i end]
Code: Select all
bind raw - 311 uw:RAW311
proc uw:RAW311 {from keyword text} {
set i [expr [string first " :" $text] + 1]
set info [string range $text $i end]
putlog "TEST $info"
}
Code: Select all
TEST :www.mysitecom/?u=1234
Code: Select all
[string trim [join [lrange $text $i end]] :]
not working...Alchera wrote:May be try:Code: Select all
[string trim [join [lrange $text $i end]] :]
Code: Select all
TEST
Code: Select all
set info [string trimleft [string range $text $i end] :]
Code: Select all
set i [expr [string first " :" $text] + 2]
set info [string range $text $i end]
I use XChat's Tcl plugin to format the above and without manipulation I'd have a series of brackets and braces amongst it all. I copied and pasted a line of code forgetting to fix it for eggdrop.[22:26] * =============== _|nTe|_ whois response ===============
[22:26] * [_|nTe|_] (gUeSs@helper.phazenet.com): gUeSs
[22:26] * [_|nTe|_] is a registered nick
[22:26] * [_|nTe|_] #scriptingshack @#phazeschool &#phazechat @#HelpDesk +#Command &#Ballarat
[22:26] * [_|nTe|_] Pothole.US.Phazenet.Com :Finer Than A Frogs Hair
[22:26] * [_|nTe|_] is available for help.
[22:26] * =============== _|nTe|_ whois end ===============
Code: Select all
# RPL_WHOISUSER
on 311 mywhois {
set whodata [split $_rest " "]
set servertab [findcontext [server]]
.......
complete EAT_ALL
}
This works greatSir_Fz wrote:Code: Select all
set info [string trimleft [string range $text $i end] :]
This one works great toonml375 wrote:Actually, the flaw is that I added 1 and not 2 to the offset. (Forgot I matched 2 characters rather than 1)
Should work as intendedCode: Select all
set i [expr [string first " :" $text] + 2] set info [string range $text $i end]
didnt work.. they give me this resultuser wrote:why not?Code: Select all
set i [expr {[string first ":" $text]+1}]
Code: Select all
TEST 0
Code: Select all
bind raw - 311 uw:RAW311
proc uw:RAW311 {from keyword text} {
set i [expr [string first " :" $text] + 2]
set info [string range $text $i end]
putlog "TEST $info"
}
Code: Select all
bind raw - 311 uw:RAW311
proc uw:RAW311 {from keyword text} {
set i [expr [string first " :" $text] + 1]
set info [string trimleft [string range $text $i end] :]
putlog "TEST $info"
}
Code: Select all
TEST www.mysitecom/?u=1234
Code: Select all
set i [expr {[string first " :" $text]+2}]