|
Joined: Oct 2005
Posts: 54
Babel fish
|
OP
Babel fish
Joined: Oct 2005
Posts: 54 |
ok i have a two questions. i was wonder is there a way that i can make a script so i can type in a certain color all the time? and is there a way you can make it so that it only does the colors on a certain server my colors i picked are 2,3
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
on *:input:*: {
if (/* iswm $1) { return }
if ($network == Undernet) {
msg $active 02,03 $+ $1-
halt
}
}
Change Undernet to whatever network you're using. To make sure you use the correct name, go to your network and type: //echo -a $network
Last edited by Riamus2; 31/05/07 11:46 AM.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Oct 2005
Posts: 54
Babel fish
|
OP
Babel fish
Joined: Oct 2005
Posts: 54 |
is there any way to have multiple networks
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
change if ($network == Undernet) to if $istok(network1 network2 network3 network4,$network,32)
|
|
|
|
Joined: Oct 2005
Posts: 54
Babel fish
|
OP
Babel fish
Joined: Oct 2005
Posts: 54 |
on *:input:*: {
if (/* iswm $1) { return }
if ($network == Undernet) {
msg $active 02,03 $+ $1-
halt
}
}
with the code givin above is there a way i can create an on and off switch like !on would do the colors 2,3 and !off just do black text only and again thanks for helpin me
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
on *:input:*: {
if ($1 == !on) { set %colorinput On | return }
elseif ($1 == !off) { set %colorinput Off | return }
if (%colorinput != On) { return }
if (/* iswm $1) { return }
if ($network == Undernet) {
msg $active 02,03 $+ $1-
halt
}
}
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Oct 2005
Posts: 54
Babel fish
|
OP
Babel fish
Joined: Oct 2005
Posts: 54 |
the !off command works however the !on command does not
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Oct 2005
Posts: 54
Babel fish
|
OP
Babel fish
Joined: Oct 2005
Posts: 54 |
*:input:*: {
if ($1 == !on) { set %colorinput On | return }
elseif ($1 == !off) { set %colorinput Off | return }
if (%colorinput != On) { return }
if (/* iswm $1) { return }
if ($network == Undernet) {
msg $active 02,03 $+ $1-
halt
}
}
thats what i have the on switch doesnt work
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
You're missing the ON parameter of the ON INPUT event. change the very first line to
|
|
|
|
Joined: Oct 2005
Posts: 54
Babel fish
|
OP
Babel fish
Joined: Oct 2005
Posts: 54 |
on *:input:*: {
if ($1 == !on) { set %colorinput On | return }
elseif ($1 == !off) { set %colorinput Off | return }
if (%colorinput != On) { return }
if (/* iswm $1) { return }
if ($network == Undernet) {
msg $active 02,03 $+ $1-
halt
}
}
how would i get the above script to do all of that plus be in more detail to add so it only works for a certain channel?
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
To limit it to a single channel, change $active to the channel name. Here's a little re-write on *:input:#channel:{
set colorinput $iif($1 == !on,$true,$iif($1 == !off,$false,%colorinput))
if %colorinput {
if (/* !iswm $1) {
if ($network == Undernet) {
msg $chan 02,03 $+ $1-
halt
}
}
}
}
|
|
|
|
Joined: Oct 2005
Posts: 54
Babel fish
|
OP
Babel fish
Joined: Oct 2005
Posts: 54 |
on *:input:#channel:{
set colorinput $iif($1 == !on,$true,$iif($1 == !off,$false,%colorinput))
if %colorinput {
if (/* !iswm $1) {
if ($network == Undernet) {
msg #tcmafia 02,03 $+ $1-
halt
}
}
}
} so this is the correct code that will work only on this channel?
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
|
|
|
|
Joined: Oct 2005
Posts: 54
Babel fish
|
OP
Babel fish
Joined: Oct 2005
Posts: 54 |
on *:input:#tcmafia:{
set colorinput $iif($1 == !on,$true,$iif($1 == !off,$false,%colorinput))
if %colorinput {
if (/* !iswm $1) {
if ($network == Undernet) {
msg $chan 02,03 $+ $1-
halt
}
}
}
}
that didnt work so well it gave me this error .. * /set: invalid parameters (line 2, script1.ini)
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
RusselB has missed a % in his code: on *:input:#tcmafia:{ set %colorinput $iif($1 == !on,$true,$iif($1 == !off,$false,%colorinput)) if %colorinput { if (/* !iswm $1) { if ($network == Undernet) { msg $chan 02,03 $+ $1- halt } } } } That should fix the error.
|
|
|
|
|