|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
I have this code:
on ^*:TEXT:*:?:{
settime
set %q.text $1-
if ($active == $chr(45) $+ psyBNC) { ech_bnc | goto end }
echo $nick %tstmp $+ $chr(3) $+ %cbrackets $+ %right $+ $chr(3) $chr(3) $+ $color(own text) $+ $nick $chr(3) $+ %cbrackets $+ %left $+ $chr(3) $+ $chr(3) $+ $color(own text) %q.text | halt
:end
}
but when i press CTRL and press Enter, then its by passed, how to prevent this ? :tongue:
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
It's not 'bypassed', the on text event is never called when you send messages, use on input.
New username: hixxy
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
how would i make that then ? im not shurehow to use use $ctrlenter :tongue:
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
You don't need to use $ctrlenter at all, you only need to use $ctrlenter if you want to keep support for it in your script (eg. being able to send /commands to the channel without using /say or similar)
New username: hixxy
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
I want the text to appear as the same way it does on /msg.. now it dont..
example:
« nick » testing <<-- without CTCL + Enter. <nick> /echo -a testing <<-- with CTRL + Enter.
look at the brackets.. that means it dont trigger my "Theme", how can i do it to trigger even due CTRL + Enter is pressed? :tongue:
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
on *:input:*:{
if (!$istok(/ $readini($mircini,text,commandchar),$left($1,1),32)) || ($ctrlenter) {
.msg $active $1-
echo -abcflirt <whatever you like>
haltdef
}
}
New username: hixxy
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
Thanx, that gave me the idea how its done, with some rewriting i got it to work as i wanted.. 
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
|
|