mIRC Home    About    Download    Register    News    Help

Print Thread
mybot #148824 10/05/06 10:36 PM
Joined: Oct 2005
Posts: 54
B
bojak71730 Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2005
Posts: 54
ok i have a problem made an op and deop script for my friends chatroom and well i can deop me but i cant op me using my bot heres the op and deop scripts
Code:
on *:TEXT:!op*:#:{
  if ($nick !isop $chan) { halt }
  if ($2 !ison $chan) { halt }
  mode $chan +o $2
}

and
Code:
on *:TEXT:!deop*:#:{
  if ($nick !isop $chan) { halt }
  if ($2 !ison $chan) { halt }
  mode $chan -o $2
}

Re: mybot #148825 10/05/06 10:50 PM
Joined: May 2006
Posts: 32
R
RedDevilUK Offline
Ameglian cow
Offline
Ameglian cow
R
Joined: May 2006
Posts: 32
because to deop youself is just a simple command

but to OP yourself you need to be authorised by the server and/or OPed by someone else
either a person or a bot

for me to be opped in my channels on Quakenet i have to auth first... to prove its me then msg the Quaknet bot in our channel with a command

if it was as simple as your script suggests... then you would have a serious security problem.. as anyone would be able to OP the same way you do?

the same way you op manually... these commands need to be in the script

Last edited by RedDevilUK; 10/05/06 10:53 PM.
Re: mybot #148826 10/05/06 10:52 PM
Joined: Oct 2005
Posts: 54
B
bojak71730 Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2005
Posts: 54
so what i could is i could make a list of people to op and the bot would me if i was on the list the thing is i made a script for an auto op but still isnt working

Re: mybot #148827 10/05/06 10:54 PM
Joined: Oct 2005
Posts: 54
B
bojak71730 Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2005
Posts: 54
i have a folder on my desktop that has a copy of mirc in it and all the alaise remote and stuff in there with it i even put a copy of the bot in a text file and added it in there to make sure i never lost it i dunno if this is all a good idea but thats what i was told to do

Re: mybot #148828 10/05/06 10:55 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
The reason you can't op yourself using the bot is because you have made it so only opped users may use the command. And since you aren't opped you can't op yourself.

Re: mybot #148829 10/05/06 10:56 PM
Joined: May 2006
Posts: 32
R
RedDevilUK Offline
Ameglian cow
Offline
Ameglian cow
R
Joined: May 2006
Posts: 32
is the bot an official bot like a server or eggbot

or is it a computer with mirc on just sitting on the channel?

if its an official bot then refer to the instructions

Re: mybot #148830 11/05/06 12:57 AM
Joined: May 2005
Posts: 449
bwr30060 Offline
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
Isn't this line a problem?
Code:
if ($nick !isop $chan) { halt }

How is this script supposed to be used? Is the person who wants to be opped the one to type "!op"? Because that line says basically "If the person is not an op when they type "!op", halt the script."

Re: mybot #148831 11/05/06 01:14 AM
Joined: Dec 2002
Posts: 417
O
Othello Offline
Fjord artisan
Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
Nothing wrong with that code.


as for this code here is a simplified version of the same code

Code:
 
on *:TEXT:!op*:#: { 
 if ($nick !isop $chan) || ($2 !ison $chan) { halt } 
 mode $chan +o $2
}
 




Intelligence: It's better to ask a stupid question, then to prove it by not asking....
Re: mybot #148832 11/05/06 03:53 AM
Joined: Dec 2002
Posts: 1,245
M
MikeChat Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
Quote:
Nothing wrong with that code.


yes there is, unless you have ops already you cant get ops? that makes no sense.

How can someone type text in a channel if they arent in the channel? If you dont have the channel mode set to stop that you are wide open to harrassment.

Quote:


Code:
 
on *:TEXT:!op*:#: { 
 if ($nick !isop $chan) || ($2 !ison $chan) { halt } 
 mode $chan +o $2
}
 


if you have the channel operators added to a user level, lets say 1000

on 1000:text:!op:#yourchannel:{ mode #yourchannel +o $nick }
and
on 1000:text:!deopop:#yourchannel:{ mode #yourchannel -o $nick }
or
on 1000:Text:!botname *:#yourchan:{
if ($$2 == !op) { mode #yourchan +o $nick }
elseif ($$2 == !deop) { mode #yourchan -o $nick }
else { notice $nick you have not requested a valid mode change }
}

or you can read from a text file, an ini file or a hash table to check if the $nick and their address match your ops list

Re: mybot #148833 11/05/06 04:33 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Quote:

yes there is, unless you have ops already you cant get ops? that makes no sense.


Isn't that what I said in the first place? Not criticising just wondering if I had the same views as you.

Re: mybot #148834 11/05/06 04:42 AM
Joined: Dec 2002
Posts: 1,245
M
MikeChat Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
while you had addressed yourself to the OP I was addressing my comment to othello, who said that the code was fine, which it isnt for the reasons we all stated.

Re: mybot #148835 11/05/06 05:47 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
For sure I totally agree with that.

Re: mybot #148836 11/05/06 05:57 PM
Joined: Oct 2005
Posts: 54
B
bojak71730 Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2005
Posts: 54
well the problem is i cant get it to read the file its on my text top the bot has its on folder with mirc and all the stuff mirc needs to run inside of it cause thats what im told to do but i still cant get it to work