@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3



Comments:

<0> but how do I check all words?
<1> err well longer than 29 chars :p
<0> jeez regex and everything
<2> tokenize $1-
<0> sophisticated.
<1> it's the easiest/quickest tool for this one, because you don't need to loop through all tokens
<2> FiberOPti: each word, not $1-
<1> rickcp: $1- represents all words
<1> the regex will check for an occurance of 30 or more non space characters in the entire sentence
<3> bahhh
<3> it does owrkk
<3> heh
<2> ok
<1> 29 or more consecutive ones that is
<1> `Spike: we could even make it so it detects what this word was, if you'd like that



<0> hehe
<3> lol
<1> if ($regex(lw,$1-,/(\S{30,})/Si)) echo -a Found a long word being $regml(lw,1)
<0> Seems that if its longer than 20 or so, its probobly a flood or something.
<1> oops it was rocko asking for it i guess, not spike
<3> Whats the identifier for a nick that's in a query session with me, i.e. $query($nick).logfile
<3> that doesn't work though
<0> What I want to trigger is to kick em out :P
<1> `Spike: according to the help file that should work, so if it doesn't then you'll have to dig deeper to find out why it doesn't work as it should
<3> darn
<3> okay
<1> like ask yourself in what context you are using that
<3> thanks
<3> maybe it's because the person i'm testing it with hasn't messaged me yet, i've just quereied them
<1> who knows, test a bit, tha'ts usually how i figure things out
<3> if $chan { run $chan($chan).logfile} elseif $query { run $query($nick).logfile }
<3> that's the context
<1> errr
<3> except i changed elseif to just else
<1> see there's your answer that's not a correct line of code
<3> heh which part?
<1> first error is that the } should not touch the .logfile part
<1> second you cannot put elseif on the same line like that
<1> you either need to use a pipe | or put it on a new line
<3> i didn't put it on the same line, jut for pasting purposes :)
<1> show it like you have it
<3> vl {
<3> if $chan {
<3> run $chan($chan).logfile
<3> }
<3> else $query {
<3> run $query($nick).logfile
<3> }
<3> )
<3> errr a } at the end too
<1> there you go, that's not correcty
<1> else $query mpakes no sense
<3> it does need to be elseif?
<3> or is elseif not even real
<1> so the real problem isn't that $query($nick).logfile doesn't return, it probably does evaluate, but that you're else construction isn't correct
<3> //echo $query($nick).logfile
<1> well it depnds on what you want exactly, probably you're looking for: elseif ($query($nick)) {
<3> that doesn't return the logfile either when typed in a query
<3> i think you hit the nail on the head with the syntax in that one
<1> have you actually said somethign already in this query?
<3> i have
<3> but they haven't
<1> that's ok if you have typed then it's logged (i don't log myself so i cnat speak about it with all too much certainty)
<3> heh
<3> could you do me afavor ane message me?
<1> sure
<3> so i can see if it works in a message
<3> heh
<1> tyhe second question is, where are you calling that vl alias?
<3> it's in my aliases
<1> yea but where do you call it
<3> and i'm typing it in the editbox of a chan/query
<3> heh



<3> it works in channels
<3> but not in queries
<1> do you actually have logging enabled for queries?
<3> yup
<3> and //echo $query($nick).logfile didn't echo anything in your query either
<3> //echo $query(FiberOpti).logfile
<3> does yield something though
<1> well $nick isn't filled when you issue it like that manually
<3> I don't think it's taking $nick in there and substituting with your nick
<1> that's why i wanted to know where you are calling that alias
<1> if it was from an event like on open or on text, then $nick is filled
<1> it's those little details that are most important
<3> Even if i type it into the query's editbox?
<1> type //echo -a $nick in the query
<3> heh
<1> ;)
<3> I'm not very good at all this coding stuf
<3> heh
<3> So how do I get that nick?
<1> it's ok, you have to start somewhere
<1> you are looking for $active instead of $nick
<1> it'll work for both channels and queries
<3> different identifier though for each
<3> $chan($chan) and $query(nick)
<1> you can use $active for both
<3> oh
<3> yeah
<1> $active returns the name of the window where you are doing somethign, so in a channel it'll evaluate to the channel name, and in a query it willev evaluate to the nickname
<3> your right
<3> thank you!
<1> btw
<1> you should check first to see if the file exists before doing /run on it
<1> if it doesnt exist, it'll give you an error that it couldn't open/find the file
<3> But for any channel/nick to be open, it's setup so that there's automatically a log
<3> unless something goes wrong
<3> heh
<1> :D
<1> well ok, but still, error checking is very important when scripting/programming
<3> i can't do elseif $query either can i?
<3> I'll keep it in mind
<3> i gotta do elseif $query($active) { blah }
<1> $query on itsself doesn't evaluate to someting afaik
<1> since you gotta specify a nickjname or a number
<1> so yea you gotta actually p*** a parameter to the $query() identifier for it to do something
<3> vl {
<3> if $chan {
<3> run $chan($chan).logfile
<3> }
<3> elseif $query($active) {
<3> run $query($nick).logfile
<3> }
<3> }
<1> well $nick has no meaning remebner, so you gotta change it in the /run there as well
<3> i guess it should be if $active = $chan or something
<3> oh shoot
<3> heh
<3> i missed that
<1> $chan is ok,, it will only be filled if it's on a channel so it's ok
<3> yeah i know that nick has no meaning
<3> i was worried bout the if stuff
<3> $nick updated to $active :)
<1> ok
<3> it works
<3> lol
<3> that was the only problem with it :)
<3> Thanks
<3> again
<1> np
<1> brb, putting food on the stove


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #mirc
or
Go to some related logs:

#beginner
#beginner
#unix
#flash
#politics
#cph
#beginner
error: conflicting types for 'tparm' bitchx term.c
#linux-noob
#microsoft



Home  |  disclaimer  |  contact  |  submit quotes