mIRC Home    About    Download    Register    News    Help

Print Thread
#173347 24/03/07 12:27 PM
Joined: Jan 2007
Posts: 280
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
When somebody does mode +q on you:

* $nick sets mode +q <the nick with owner>

But wich code is it?

$qnick?
$ownernick?

Doesn't work.

Code:
ON ^1:OWNER:#:{
  echo $chan 10€12 $nick 11(10 $+ $address $+ 11)12 zet mode $1 op $qnick 12€
  .halt
}




Squee whenever a squee squee's. Squee whenever a squee does not squee.
DuXxXieJ #173349 24/03/07 12:32 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Keep in mind that on OWNER only works on specific networks (IRCD, I believe). As for what you'd use, I don't know because I don't use a network that has owner status.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #173351 24/03/07 12:51 PM
Joined: Jan 2007
Posts: 280
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
Erm, but when i use:

Code:
ON ^1:MODE:#:{
  echo $chan 10€12 $nick 11(10 $+ $address $+ 11)12 zet mode $1 aan/uit 5€
  .halt
}


It does not Owner. Only +m, +n, +s, that stuff.

Php Code:

@ = S.O.P, A.O.P and Owner.
% = H.O.P.
+ = V.O.P
 


(That we use)


Squee whenever a squee squee's. Squee whenever a squee does not squee.
DuXxXieJ #173352 24/03/07 01:39 PM
Joined: Jan 2007
Posts: 280
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
Nvm, it was $opnick


but thanks!


Squee whenever a squee squee's. Squee whenever a squee does not squee.
DuXxXieJ #173355 24/03/07 02:03 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
@ is anyone with Ops status (/mode #channel +o nick)

Owner/Deowner is only recognized properly on IRCX servers.

The ON MODE event is for Channel modes, which this is not.

Here's a suggestion for you to try. Please note that I have used ~ for the character that represents the owner mode, change if necessary.

Code:
on ^*:rawmode:#:{
  if q isin $2 {
    var %a = 2, %b = $len($2)
    while %a <= %b {
      if $mid($2,%a,1) == q {
        set %opnicks $addtok(%opnicks,$gettok($3-,$calc(%a - 1),32),32)
      }
      inc %a
    }
    .msg $chan $nick ( $+ $address $+ ) set mode +q for %opnicks
  }
  haltdef
}


You had the right idea regarding ON MODE, just not the right event.

RusselB #173427 25/03/07 10:20 AM
Joined: Mar 2007
Posts: 38
H
Ameglian cow
Offline
Ameglian cow
H
Joined: Mar 2007
Posts: 38
Originally Posted By: RusselB
@ is anyone with Ops status (/mode #channel +o nick)

Owner/Deowner is only recognized properly on IRCX servers.

The ON MODE event is for Channel modes, which this is not.

Here's a suggestion for you to try. Please note that I have used ~ for the character that represents the owner mode, change if necessary.

Code:
on ^*:rawmode:#:{
  if q isin $2 {
    var %a = 2, %b = $len($2)
    while %a <= %b {
      if $mid($2,%a,1) == q {
        set %opnicks $addtok(%opnicks,$gettok($3-,$calc(%a - 1),32),32)
      }
      inc %a
    }
    .msg $chan $nick ( $+ $address $+ ) set mode +q for %opnicks
  }
  haltdef
}


You had the right idea regarding ON MODE, just not the right event.


Nice works but you ignore the most important:
if ($left($1,1) == +) smile (If only set + modes)
Or: if (- isin $1) { $remove($1,-,modes) }

And doesn't work properly if it has +i or +s on the middle, eg: ***You sets mode: +qqbiq Reinox HuMoR @devnull.org Peter
You need exclude ($remove) the modes that they doesn't use parameters.

Only a suggestion wink

Cya!.-


"if ($me ison $forum) { say Hello! }"
HuMoR #173509 25/03/07 07:14 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Well, considering the fact that the + or - at the beginning of that section would also be in $2, your suggestion (which uses $1) wouldn't work either.

I said it was a suggestion, not a guaranteed solution.

Also, my code does take into account the non q modes that might be set, since I check the position in $2 for the q mode, and add the name that matches the equivalent position..

RusselB #173511 25/03/07 07:20 PM
Joined: Mar 2007
Posts: 38
H
Ameglian cow
Offline
Ameglian cow
H
Joined: Mar 2007
Posts: 38
Originally Posted By: RusselB
Well, considering the fact that the + or - at the beginning of that section would also be in $2, your suggestion (which uses $1) wouldn't work either.

I said it was a suggestion, not a guaranteed solution.

Also, my code does take into account the non q modes that might be set, since I check the position in $2 for the q mode, and add the name that matches the equivalent position..


Yes yes! And works fine. I just say a few possible bugs to considerate...
Like I said, nice work!

Cya!.-

EDIT: If + and - is in modes all are in $1, I think...

Last edited by HuMoR; 25/03/07 07:22 PM.

"if ($me ison $forum) { say Hello! }"

Link Copied to Clipboard