|
Joined: Aug 2003
Posts: 29
Ameglian cow
|
OP
Ameglian cow
Joined: Aug 2003
Posts: 29 |
OK, here's another question... In the "on *:input:---" command, is there a way to distinguish whether I use a /command or whether I type in a normal message?
Kewlio Insanity is all I have to keep from becoming insane.
|
|
|
|
Joined: Feb 2003
Posts: 79
Babel fish
|
Babel fish
Joined: Feb 2003
Posts: 79 |
on *:INPUT:*: { if ($left($1,1) == /) { return $1- | halt } ect... }
its important that part on the top, unless u want something to go first....
|
|
|
|
Joined: Aug 2003
Posts: 29
Ameglian cow
|
OP
Ameglian cow
Joined: Aug 2003
Posts: 29 |
OK, what I want to do doesn't seem to be working. Here's the tentative script: on *:input:#:{ if (%selfmod == 1) + ($left($1,1) != /) { /echo 4 -at SELF-MODERATION ON: 7Cannot chat in any channel | /halt } } I'm not even sure if this is valid script (because of the +)... The ifs confuse me...
Kewlio Insanity is all I have to keep from becoming insane.
|
|
|
|
Joined: Feb 2003
Posts: 79
Babel fish
|
Babel fish
Joined: Feb 2003
Posts: 79 |
on ^*:input:#:{ if ($left($1,1) != /) { what to do when its a command | halt } if (%selfmod == 1) { what to do when its a message | halt } else { what to do when its not a command or msg... } haltdef }
if its still not right just tell me what u wanna do. a note, its not if () + () its &&
|
|
|
|
Joined: Aug 2003
Posts: 29
Ameglian cow
|
OP
Ameglian cow
Joined: Aug 2003
Posts: 29 |
The snippet you proposed wasn't really what I needed. However, the && tip fixed me right up. Thank you
Kewlio Insanity is all I have to keep from becoming insane.
|
|
|
|
Joined: Feb 2003
Posts: 79
Babel fish
|
Babel fish
Joined: Feb 2003
Posts: 79 |
YAY lol...if u need any other help u can just IM me instead of hitting refresh over and over or checking ur email constantly...lol..ur doin pretty basic stuff so i could probably be of use AIM: Ancyker MSN: Ancyker@hotmail.comIRC: /server 216.65.55.76 6667 ( #Xeronic ) Your welcome for the help and happy scripting!
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
You really shouldn't spam your e-mail address, let alone IRC servers. Even if it is for helping purposes.
|
|
|
|
Joined: Dec 2002
Posts: 117
Vogon poet
|
Vogon poet
Joined: Dec 2002
Posts: 117 |
Actually, if you really want to catch commands the right way:
on *:INPUT:*: {
if (($left($1,1) isin $+(/,$cmdchar)) && (!$ctrlenter)) { its a command }
else { its text }
}
Not like many people change their command char (note that / will still be recognised as command char if you do) but I think being able to send lines starting with / by pressing [ctrl][enter] is a nice feature, and it would be a shame to script it out.
$input(Me like stars, You too?)
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
$cmdchar doesn't return anything for me.
|
|
|
|
Joined: May 2003
Posts: 215
Fjord artisan
|
Fjord artisan
Joined: May 2003
Posts: 215 |
It should be...
if (($left($1,1) isin $+(/,$readini($mircini,text,commandchar)))
- Jason
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
No, it should be:
if (($left($1,1) isin $+(/,$readini($mircini,text,commandchar)))[color:red])[/color]
* /if: invalid format (line 2, script.ini)
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
That wasn't the entire line though, lammkott was only correcting the first part of the if command that Rich used, i.e. if (($left($1,1) isin $+(/,$readini($mircini,text,commandchar))) && (!$ctrlenter)) { its a command } works fine, add your extra ) and it doesn't.
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Well, I was just adding on to lammkott's post, when I added the extra ) it worked fine.
on *:INPUT:*: {
if (($left($1,1) isin $+(/,$readini($mircini,text,commandchar)))) { $1- | halt }
else { msg $active $1- | halt }
}
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
Yes, but lammkott was only correcting the first part of Rich's if command, not all of it, i.e. "&& (!$ctrlenter))" should be on the end.
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Sorry, I didn't know.
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
here's a question, why is your condition surrounded twice by parenthesis?
if (($left($1,1) isin $+(/,$readini($mircini,text,commandchar))))
-KingTomato
|
|
|
|
|