|
juble
|
juble
|
hi i have a script from sladekraven that when my bot is oper then some friends of mine who they are in command list with the text command ( !ban ) banned someone if they want it through the bot . Now ..is it possible with the same way anyone who is in command list to give order (when the bot is not an oper but it is in the channel) to become the bot an oper? (like op through chanserv) example : !opbot this is the script for the ban command for example:
menu nicklist {
Commands List
.Add: {
if ($read(commands.lst,w,$address($$1,8))) {
echo 2 -a *** $$1 ( $+ $address($$1,8) $+ ) is already in commands list.
}
else {
echo 2 -a *** Added $$1 ( $+ $address($$1,8) $+ ) to commands list.
.write commands.lst $address($$1,8)
}
}
.Del: {
if (!$read(commands.lst,w,$address($$1,8))) {
echo 2 -a *** $$1 ( $+ $address($$1,8) $+ ) isn't in commands list.
}
else {
echo 2 -a *** Removed $$1 ( $+ $address($$1,8) $+ ) commands list.
write -dw $+("*,$address($$1,8),*") commands.lst
}
}
}
on @*:Text:!ban *:#: {
if ($read(commands.lst,w,$address($nick,8))) {
if ($2 ison $chan) && ($2 !isop $chan) && ($2 != $me) { ban -k $chan $2 3 $3- }
}
}
thanks
|
|
|
|
bloodfog
|
bloodfog
|
on @*:Text:!*:#:{
if ($read(commands.lst,w,$address($nick,8))) {
if ($1 = !ban) { if ($2 ison $chan) && ($2 !isop $chan) && ($2 != $me) { ban -k $chan $2 3 $3- } }
if ($1 = !kick) { if ($2 ison $chan) && ($2 !isop $chan) && ($2 != $me) { kick $chan $2 $iif($3,$3-,no reason) } }
if ($1 = !operup) { chanserv op $chan $me }
}
}
|
|
|
|
Joined: Apr 2004
Posts: 755
Hoopy frood
|
Hoopy frood
Joined: Apr 2004
Posts: 755 |
on @*:Text:!opbot *:#: {
if ($read(commands.lst,w,$address($nick,8))) {
if ($2 ison $chan) && ($2 !isop $chan) && ($2 != $me) { msg chanserv OP $chan $2 }
}
}
your request was a tad hard to understand, i hope this is what you meant.
|
|
|
|
Joined: Aug 2004
Posts: 7,168
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,168 |
Without knowing which server your on, all I can do is give you a general code. Some chanserv's have different functions activated, so while this will work on the server I'm on, I can't guarantee it'll work on yours. on *:text:!opbot:#:{ .cs op $chan $me }
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
Hey juble, try this..
menu nicklist {
Commands List
.Add: {
if ($read(commands.lst,w,$address($$1,8))) {
echo 2 -a *** $$1 ( $+ $address($$1,8) $+ ) is already in commands list.
}
else {
echo 2 -a *** Added $$1 ( $+ $address($$1,8) $+ ) to commands list.
.write commands.lst $address($$1,8)
}
}
.Del: {
if (!$read(commands.lst,w,$address($$1,8))) {
echo 2 -a *** $$1 ( $+ $address($$1,8) $+ ) isn't in commands list.
}
else {
echo 2 -a *** Removed $$1 ( $+ $address($$1,8) $+ ) commands list.
write -dw $+("*,$address($$1,8),*") commands.lst
}
}
}
on @*:Text:*:#: {
if ($read(commands.lst,w,$address($nick,8))) {
if ($1 == !ban) {
if ($2 ison $chan) && ($2 !isop $chan) && ($2 != $me) {
ban -k $chan $2 3 $3-
}
}
if ($1 == !opbot) {
ChanServ OP $chan $me
}
;More commands here
}
}
-Andy
|
|
|
|
juble
|
juble
|
thanks all of you  only one thing again if i want it to add only with the nicks not host or adress what can i do ????? """on @*:Text:*:#: { if ($read(commands.lst,w,$address($nick,8))) { """"
Last edited by juble; 17/05/05 04:05 PM.
|
|
|
|
Joined: Aug 2004
Posts: 7,168
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,168 |
Just use $nick in place of $address($nick,8)
Used the $address($nick,8) from your posted example
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
The whole point of adding the host is because anyone can use that nick and then the bot will become vulnerable. But it's entirely up to you at the end of the day.  -Andy
|
|
|
|
juble
|
juble
|
i replace it with the $nick but its not work  * sladekraven i now what u mean but the nicks in command list are registered nicks to the server!
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
Untested, but try this..
menu nicklist {
Commands List
.Add: {
if ($read(commands.lst,w,$$1)) {
echo 2 -a *** $$1 is already in commands list.
}
else {
echo 2 -a *** Added $$1 to commands list.
.write commands.lst $$1
}
}
.Del: {
if (!$read(commands.lst,w,$$1)) {
echo 2 -a *** $$1 isn't in commands list.
}
else {
echo 2 -a *** Removed $$1 from commands list.
write -dw $+("*,$$1,*") commands.lst
}
}
}
on @*:Text:*:#: {
if ($read(commands.lst,w,$nick)) {
if ($1 == !ban) {
if ($2 ison $chan) && ($2 !isop $chan) && ($2 != $me) {
ban -k $chan $2 3 $3-
}
}
if ($1 == !opbot) {
ChanServ OP $chan $me
}
;More commands here
}
}
-Andy
|
|
|
|
juble
|
juble
|
Thanks Slade it's work now Good luck in Canada 
Last edited by juble; 19/05/05 05:36 PM.
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
Thank you for that gesture, I'll need all the luck I can get hold of. Although, I have been before and found the people ever so friendly, 2 years have passed, I'll be reunited with my father once again. I hope they'll still be friendly with me.  -Andy
|
|
|
|
|