mIRC Home    About    Download    Register    News    Help

Print Thread
#148824 10/05/06 10:36 PM
Joined: Oct 2005
Posts: 54
B
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
}

#148825 10/05/06 10:50 PM
Joined: May 2006
Posts: 32
R
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.
#148826 10/05/06 10:52 PM
Joined: Oct 2005
Posts: 54
B
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

#148827 10/05/06 10:54 PM
Joined: Oct 2005
Posts: 54
B
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

#148828 10/05/06 10:55 PM
Joined: Dec 2002
Posts: 3,547
S
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.

#148829 10/05/06 10:56 PM
Joined: May 2006
Posts: 32
R
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

#148830 11/05/06 12:57 AM
Joined: May 2005
Posts: 449
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."

#148831 11/05/06 01:14 AM
Joined: Dec 2002
Posts: 417
O
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....
#148832 11/05/06 03:53 AM
Joined: Dec 2002
Posts: 1,245
M
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

#148833 11/05/06 04:33 AM
Joined: Dec 2002
Posts: 3,547
S
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.

#148834 11/05/06 04:42 AM
Joined: Dec 2002
Posts: 1,245
M
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.

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

#148836 11/05/06 05:57 PM
Joined: Oct 2005
Posts: 54
B
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


Link Copied to Clipboard