mIRC Home    About    Download    Register    News    Help

Print Thread
#61592 23/11/03 09:46 PM
Joined: Oct 2003
Posts: 14
P
Pikka bird
OP Offline
Pikka bird
P
Joined: Oct 2003
Posts: 14
Hello,
I'm having a problem here, I'm trying to make a script to voice/op someone if they're in the users.ini This is what I've tried:
Code:
on *:JOIN:#TacticalS:{
  if ($nick ison $readini(users.ini, Operator, $nick)) { /mode $chan +o $nick | /halt }
  if ($nick ==  $readini(users.ini, voice, $nick)) { /mode $chan +v $nick | halt }
  notice $nick Welcome to Tactical Summary News channel, please visit our website.
}  


With the break down if I have an ini file like this:

[Admin]
TS-Proselyte=admin
TS-News=noadmin
[Ops]
TS-Proselyte=operator
[Voice]
proselyte=voice

And TS-News joins the channel, it checks under [Admin] finds his name, checks his value and gets a noadmin. So he doesn't get OP'd.
Then proselyte joins and it checks under [Voice] checks his value, it says voice, so he's voiced. How do I do that?

What's the deal?

#61593 23/11/03 10:42 PM
Joined: Dec 2002
Posts: 397
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
this is untested but w/e it might work might not =p

Code:
on *:JOIN:#TacticalS:{
  if ($nick isin $readini(users.ini, Operator, $nick)) { .op $nick }
  elseif ($nick isin $readini(users.ini, voice, $nick)) { .mode # +v $nick }
  .notice $nick Welcome to Tactical Summary News channel, please visit our website.
}


Need amazing web design for low price: http://www.matrixn3t.net
#61594 23/11/03 11:44 PM
Joined: Nov 2003
Posts: 5
F
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
F
Joined: Nov 2003
Posts: 5
"ison" wont work because it return TRUE if a nick (person) is on a channel ... i.e. if ($nick ison #foo)

#61595 24/11/03 05:24 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Please don't post untested code. It doesn't help

Code:
on *:JOIN:#TacticalS:{ 
  if ($readini(users.ini, Admin, $nick) == admin) mode # +o $nick $nick
  elseif ($readini(users.ini, Ops, $nick) == operator) mode # +o $nick
  elseif ($readini(users.ini, voice, $nick) == voice) mode # +v $nick
  else .notice $nick Welcome to Tactical Summary News channel, please visit our website.
}


Although you might wanna consider using mIRC's user list for this. Makes it easier.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius

Link Copied to Clipboard