mIRC Home    About    Download    Register    News    Help

Print Thread
#139897 19/01/06 11:44 AM
Joined: Mar 2005
Posts: 21
I
Iljan Offline OP
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Mar 2005
Posts: 21
Hello,

I am busy to wright a bot and i dont know where to start. I want a script that when i say in a query

!grand Host@mask.ext #channel

the bot must op the user when the person joins the channel

same for

!revoke host #channel

Is there a script that puts them in and out the mirc autoop list?

Then i get to the following problem:

Only people i have alowed can make privileges.

Lets say i am the superadmin and can grand people (the admins) to to make auth changes. so when there hostmask are in the auth.txt for example the can ad an op

#139898 19/01/06 04:32 PM
Joined: Apr 2005
Posts: 53
A
Babel fish
Offline
Babel fish
A
Joined: Apr 2005
Posts: 53
Code:
on 1000:text:!grand*:?:{ /aop -w $2 $3- }
on 1000:text:!revoke*:?:{ /aop -r $2 $3- } 


That is a simple script to add or remove auto-op for person in channel. You use it like this: !grand *!*@hostname.com #channel (you can add aop for more channels separated by an empty space), the same thing is with !revoke. I used -w switch so person will have aop on all networks. You can add superadmin by typing /auser 1000 *!*@adminhostname.com (or other types of admin's masks) and remove the user with /ruser 1000 *!*@adminhostname.com

#139899 20/01/06 09:04 AM
Joined: Mar 2005
Posts: 21
I
Iljan Offline OP
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Mar 2005
Posts: 21
so the following script would work if i undestand right

Code:
 on 1:TEXT:!aop*:?:{ if ($nick isin %administrators) {
	if ($2 == add) { /aop -w $2 $3- }
	else {
	if ($2 == del) { /aop -r $2 $3- } } 
else
	{ /notice $nick You have insufficient rights to take this action. } }   

#139900 20/01/06 09:25 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
in your /aop lines, change $2 to $3 and $3- to $4-

Otherwise you'll be doing a command like
Code:
 /aop add jim #j1 #j2 #j3 


When what you want is
Code:
/aop jim #j1 #j2 #j3  


I'm not positive, but I think the channels have to be separated with commas. I didn't make the change above, but if this is the case, then you want your /aop command to read
Code:
 /aop $3 $replaceex($4-,$chr(32),$chr(44)) 


Link Copied to Clipboard