mIRC Home    About    Download    Register    News    Help

Print Thread
#18899 12/04/03 02:14 AM
Joined: Mar 2003
Posts: 34
L
Lucres Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Mar 2003
Posts: 34
mmk, this is what i have:


Code:
 on *:text:* addquote *:#: {
  if ( $1 == %p ) { /write Quotes.txt $3- | msg $chan -Quote Added- }
}
 


It doesn't write to Quotes.txt , And I've tried:
Moving the file to C:\mIRC\Quotes.txt <- doesn't help
Actually adding $3- in <- oops grin
Other things.

Can someone please help? crazy


Heh..
#18900 12/04/03 03:16 AM
Joined: Mar 2003
Posts: 54
J
Babel fish
Offline
Babel fish
J
Joined: Mar 2003
Posts: 54
What's %p supposed to be? Remember, you're matching the first word with %p, and since you use wildcards on both sides of !addquote, the first word could be anything.

#18901 12/04/03 03:26 AM
Joined: Dec 2002
Posts: 332
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
Code:
  
On *:TEXT:*addquote*:#: {
 if ( $1 == %p ) {
 set %quotetext $3-
 write quotes.txt %quotetext
 msg $chan -Quote Added- 
}
}

i simply added a variable for $3- and in the matchtext portion i grouped it where you had * addquote * i took out the spaces

#18902 12/04/03 09:16 AM
Joined: Jan 2003
Posts: 87
T
Tat Offline
Babel fish
Offline
Babel fish
T
Joined: Jan 2003
Posts: 87
Code:
on *:text:$+(%p *addquote*):#: { 
write Quotes.txt $$3-
msg $chan -Quote Added- 
}


I'd really feel better changing the given syntax. %p seems a bit odd.

Code:
on *:text:!addquote *:#: { 
write Quotes.txt $$2-
msg $chan -Quote Added- 
}

Would be how I'd do it. But, with no clue what %p is, I can't
go about changing it willy nilly. Also, be careful to note that
there is an intrisic bug to your original code. If somebody types:
%p blahblah I would like to tell you all how to addquote to this bot.
It'll trigger, because *addquote* matches and %p is $1. I
assume $2 is suppose to be addquote, in which case:
Code:
on *:text:$+(%p addquote *):#: { 
    write Quotes.txt $$3-
    msg $chan -Quote Added- 
}

Would be better. I could do better if I knew what the heck %p was.

#18903 12/04/03 03:11 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Code:
on *:text:[color:red]$([/color]%p addquote *):#:{
  write quotes.txt $$3-
  msg # -Quote Added-
}
No "+"
$+(..,..) = .. $+ ..
$(..) = "$eval(..)"

"It'll trigger, because *addquote* matches and %p is $1."
Not unless %p is set to "%p", literally.


Link Copied to Clipboard