This is a simple bot commands .Put this in your bot's remote . I am a little noob cause Im new in scripting and I know other things of scripting like : $newnick , $2 , $3- . I learned it from all of you guys...
::Commands::
★Kick - .k ★
★JOIN - .j ★
★PART - .p ★
★Quit - .quit ★
★OP - .op ★
★DEOP - .dop ★
on *:TEXT:.k *:#: {
if ($Nick isop %chan) /k $2 $3-
}
on *:TEXT:.j *:#: {
/j $2
}
on *:TEXT:.p *:#: {
/part $2 $3-
}
on *:TEXT:.quit *:#: {
/quit $2-
}
on *:TEXT:.op *:#: {
if ($nick isop %chan) /mode $chan +o $2
}
on *:TEXT:.dop *:#: {
if ($nick isop %chan) /mode $chan -o $2
}
You can also do it using /goto command:
on @*:text:*:#: {
tokenize 32 $strip($1-)
var %m = $1 | goto %m
:.k | $iif($$2 ison #,kick # $2 $3-) | halt
:.p | $iif($$2 ischan,part $2) | halt
:.quit | quit $$2- | halt
:.op | $iif($$2 !isop #,mode # +o $2) | halt
:.deop | $iif($$2 isop #,mode # -o $2) | halt
:%m | return
}
Note that the $$ is used because you want the $2 to be specified, or else you'll get an insufficient parameter error.
Guitar, if it's for matching one nick mode, I'll just use the isop operator instead of the $nick(#,$nick,o)
$nick(#,$nick,[user mode here]) is good for match multiple nick modes at the same time. Compared to all of your examples, my initial example only has one if statement.
Furthermore,
on *:TEXT:#:{
if ($me isop $chan) {
Can just be:
on @*:TEXT:#:{
As i was saying
Well , Cadet Andrew you said
on *:TEXT:#:{
if ($me isop $chan) {
if ($1 == .k) { /kick # $2 $3- }
}
elseif ($1 == .j) { /join $2 }
elseif ($1 == .p) { /part $2 }
elseif ($1 == .quit) { /quit $2- }
elseif ($1 == .op) { /mode $chan +o $2 }
elseif ($1 == .dop) { /mode $chan -o $2 }
}
Look at this
elseif ($1 == .p) { /part $2 }
Then how can you make your bot tell the reason ,
It should be
elseif ($1 == .p) ( /part $2 $3- }
Well , Cadet Andrew you said
on *:TEXT:#:{
if ($me isop $chan) {
if ($1 == .k) { /kick # $2 $3- }
}
elseif ($1 == .j) { /join $2 }
elseif ($1 == .p) { /part $2 }
elseif ($1 == .quit) { /quit $2- }
elseif ($1 == .op) { /mode $chan +o $2 }
elseif ($1 == .dop) { /mode $chan -o $2 }
}
Look at this
elseif ($1 == .p) { /part $2 }
Then how can you make your bot tell the reason ,
It should be
elseif ($1 == .p) ( /part $2 $3- }
You don't want to have more then one on TEXT event in one file, this would be much more affective:
I also see alot of errors in this, this code should fix everything.
on *:TEXT:#:{
if ($me isop $chan) {
if ($1 == .k) { /kick # $2 $3- }
}
elseif ($1 == .j) { /join $2 }
elseif ($1 == .p) { /part $2 }
elseif ($1 == .quit) { /quit $2- }
elseif ($1 == .op) { /mode $chan +o $2 }
elseif ($1 == .dop) { /mode $chan -o $2 }
}