mIRC Home    About    Download    Register    News    Help

Print Thread
#5345 07/01/03 09:32 AM
Joined: Jan 2003
Posts: 6
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jan 2003
Posts: 6
on *:part:#:{
if ($nick(#,0) = 2) && ($nick != $me) && ($me !isop $chan) {
set %rejoin.topic $chan($chan).topic
hop -cn #
mode # +nt
topic $chan %rejoin.topic
unset %rejoin.topic
}
}

That worked for one time, but now it doesn't work when the last person other than me got disconnected due to ping timeout and the channel did not have any topic. confused

#5346 07/01/03 10:08 AM
Joined: Dec 2002
Posts: 51
D
Babel fish
Offline
Babel fish
D
Joined: Dec 2002
Posts: 51
your script checks to see if you are not oped, and hops. if you are an op, it wont hop.

if you want to hop regardless of if you are oped or not, remove the
&& ($me !isop $chan)
Code:
on *:part:#:{ 
if ($nick(#,0) = 2) && ($nick != $me)  { 

then it should do what you want

Last edited by Dingo; 07/01/03 10:13 AM.
#5347 07/01/03 10:24 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
That script triggers 'on part', not 'on quit'.
Code:
on *!:part:#:{
  if ($nick(#,0) == 2) && ($me !isop #) {
    var %topic = $chan(#).topic
    hop -cn #
    mode # +nt
    if (%topic) topic # %topic
  }
}
on *!:quit:{
  var %i = 1
  while ($chan(%i)) {
    var %c = $ifmatch
    if ($nick(%c,0) == 2) && ($me !isop %c) {
      var %topic = $chan(%c).topic
      hop -cn %c
      mode %c +nt
      if (%topic) topic %c %topic
    }
    inc %i
  }
}
"on *!:..." means NOT me, so there is no need for an "if ($nick != $me) check smile

#5348 07/01/03 11:06 AM
Joined: Jan 2003
Posts: 6
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jan 2003
Posts: 6
when only 2 persons are in a channel, and i'm one of them, and the other guy has got operator status.

he voices me, and the script keeps making me hop the channel. confused

Last edited by piertiong; 07/01/03 11:20 AM.
#5349 07/01/03 01:40 PM
Joined: Jan 2003
Posts: 6
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jan 2003
Posts: 6
up

#5350 07/01/03 01:43 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Please don't spam, it just annoys people.

#5351 07/01/03 02:02 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
OK Sorry, I used a wrong identifier, try it this way
Code:
on *!:quit:{
  updatenl
  var %i = 1
  while ($comchan($nick,%i)) {
    var %c = $ifmatch
    if ($nick(%c,0) == 1) && ($me !isop %c) {
      var %topic = $chan(%c).topic
      hop -cn %c
      mode %c +nt
      if (%topic) topic %c %topic
    }
    inc %i
  }
}
BTW. It isn't good to edit your posts like that, I had already read that post (where you said it worked), if Collective didn't post I would not have seen the changes at all :tongue:

#5352 08/01/03 12:03 PM
Joined: Jan 2003
Posts: 6
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jan 2003
Posts: 6
sorry dude. smile


Link Copied to Clipboard