Script Security

Moderator: GeekShed.Net Staff

Script Security

Postby edgy » Thu Jan 28, 2010 7:08 pm

Hi,

Say I have a script on my bot (e.g. !staffonly) and I want it only to work for people who are ops how would I secure my command?

I have tried code snippets off other website but I can't get them to work. All I want the command to do is output some text?

Many thanks,
edgy :geek:
Image
Follow me on Twitter: http://twitter.com/edgy360
User avatar
edgy
 
Posts: 37
Joined: Sun Dec 27, 2009 11:29 am
Location: United Kingdom

Re: Script Security

Postby Phil » Thu Jan 28, 2010 7:21 pm

/help access levels
Phil
 
Posts: 142
Joined: Thu Oct 22, 2009 8:16 pm

Re: Script Security

Postby edgy » Thu Jan 28, 2010 7:23 pm

No such command.

:?
Image
Follow me on Twitter: http://twitter.com/edgy360
User avatar
edgy
 
Posts: 37
Joined: Sun Dec 27, 2009 11:29 am
Location: United Kingdom

Re: Script Security

Postby edgy » Thu Jan 28, 2010 7:24 pm

Wait, it loaded!

Typed it in the wrong window! :lol:
Image
Follow me on Twitter: http://twitter.com/edgy360
User avatar
edgy
 
Posts: 37
Joined: Sun Dec 27, 2009 11:29 am
Location: United Kingdom

Re: Script Security

Postby edgy » Thu Jan 28, 2010 7:26 pm

Wait, is there any way to use the channels level and not a internal access list on the client?

(e.g. using the isop, but I don't know how to use it :? )
Image
Follow me on Twitter: http://twitter.com/edgy360
User avatar
edgy
 
Posts: 37
Joined: Sun Dec 27, 2009 11:29 am
Location: United Kingdom

Re: Script Security

Postby Phil » Thu Jan 28, 2010 7:34 pm

/help if then else
Phil
 
Posts: 142
Joined: Thu Oct 22, 2009 8:16 pm

Re: Script Security

Postby edgy » Thu Jan 28, 2010 7:47 pm

I followed the instructions but it won't work :(

on 1:text:!chantopic 1:#jojay:if($nick isop $chan){/topic $chan $2- - http://jojaynetwork.co.cc/} else{/msg $chan Access denied}
Image
Follow me on Twitter: http://twitter.com/edgy360
User avatar
edgy
 
Posts: 37
Joined: Sun Dec 27, 2009 11:29 am
Location: United Kingdom

Re: Script Security

Postby Phil » Thu Jan 28, 2010 7:52 pm

If you correctly formatted your code it would be easier to find your syntax errors.

Try:

Code: Select all
on 1:text:!chantopic 1:#jojay:{
  if($nick isop $chan) {
    /topic $chan $2- - http://jojaynetwork.co.cc/
  }
  else {
    /msg $chan Access denied
  }
}


Phil
Phil
 
Posts: 142
Joined: Thu Oct 22, 2009 8:16 pm

Re: Script Security

Postby edgy » Thu Jan 28, 2010 7:54 pm

Thanks but it still is letting unopped people change it :/

Please take a look in #jojay
Image
Follow me on Twitter: http://twitter.com/edgy360
User avatar
edgy
 
Posts: 37
Joined: Sun Dec 27, 2009 11:29 am
Location: United Kingdom

Re: Script Security

Postby edgy » Thu Jan 28, 2010 8:15 pm

Yey, it works now! Thanks Phil! :D
Code: Select all
on 1:text:!chantopic *:#jojay:{
  if ($nick isop $chan) {
    /topic $chan $2- - http://jojaynetwork.co.cc/
  }
  else {
    /notice $nick Access denied.
  }
}
Image
Follow me on Twitter: http://twitter.com/edgy360
User avatar
edgy
 
Posts: 37
Joined: Sun Dec 27, 2009 11:29 am
Location: United Kingdom


Return to Script help

Who is online

Users browsing this forum: No registered users and 3 guests

cron