mIRC Home    About    Download    Register    News    Help

Print Thread
#121776 01/06/05 04:35 PM
Joined: Apr 2005
Posts: 38
J
juble Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Apr 2005
Posts: 38
hi there
i need a funny script but i dont know if its possible
i want every nick that join in channel then the bot to put him with some script code to the topic
for example
* RHETT_BUTLER has joined #channel
then the bot .......
* bot lchanges topic to 'RHETT_BUTLER,'
* Alice has joined #channel
then.........
* bot lchanges topic to 'RHETT_BUTLER,Alice '

thank you for advance smile

#121777 01/06/05 04:41 PM
Joined: Mar 2004
Posts: 359
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 359
Code:
on 1:JOIN:#CHANNEL: {
   if (%jtnicks) set %jtnicks %jtnicks $nick
   else set %jtnicks $nick
   topic # %jtnicks
}


Make sure you change #CHANNEL to your channel.

Last edited by LostServ; 01/06/05 04:41 PM.
#121778 01/06/05 05:26 PM
Joined: Apr 2005
Posts: 38
J
juble Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Apr 2005
Posts: 38
thanks dude smile

#121779 01/06/05 05:42 PM
Joined: Mar 2004
Posts: 359
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 359
Your welcome smile

#121780 01/06/05 05:48 PM
Joined: Apr 2005
Posts: 38
J
juble Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Apr 2005
Posts: 38
but how can i make it if someone join-part three or four times to not wrote his nick three or four times?
something with variables but i cant make it
%jtnicks

#121781 01/06/05 09:44 PM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
Code:
 
on 1:JOIN:#CHANNEL: {

   if [color:red] !$findtok(%jtnicks,$nick,32) [/color]  set %jtnicks %jtnicks $nick

   else set %jtnicks $nick

   topic # %jtnicks

} 


i havent tested but should work.
Also you might wanna make a similar one for removing nicks when they quit/part/get kicked too.

btk

Last edited by billythekid; 01/06/05 09:46 PM.

billythekid
#121782 01/06/05 10:09 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
You could replace:

if !$findtok(%jtnicks,$nick,32) set %jtnicks %jtnicks $nick
else set %jtnicks $nick

with

%jtnicks = $addtok(%jtnicks,$nick,32)


Gone.
#121783 02/06/05 05:10 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Code:
alias -l max.topic.length return 512
alias -l channel return #CHANNEL
;
on *:JOIN:$($channel): {
  if ($addtok($remtok(%jtnicks,$nick,1,32),$nick,32) != %jtnicks) {
    set -s %jtnicks $v1
    while ($len(%jtnicks) > $max.topic.length) { | var %jtnicks = $gettok(%jtnicks,2-,32) } | .timer.topic.change 1 1 topic $chan %jtnicks
  }
}
;
on *:PART:$($channel):{ 
  if ($istok(%jtnicks,$nick,32)) {
    set -s %jtnicks $remtok(%jtnicks,$nick,1,32)
    while ($len(%jtnicks) > $max.topic.length) { | var %jtnicks = $gettok(%jtnicks,2-,32) } | .timer.topic.change 1 1 topic $chan %jtnicks
  }
}
on *:KICK:$($channel):{
  if ($istok(%jtnicks,$knick,32)) {
    set -s %jtnicks $remtok(%jtnicks,$knick,1,32)
    while ($len(%jtnicks) > $max.topic.length) { | var %jtnicks = $gettok(%jtnicks,2-,32) } | .timer.topic.change 1 1 topic $chan %jtnicks
  }
}
;
on *:QUIT:{ var %chan = $channel
  if ($nick ison %chan) {
    set -s %jtnicks $remtok(%jtnicks,$nick,1,32)
    while ($len(%jtnicks) > $max.topic.length) { | var %jtnicks = $gettok(%jtnicks,2-,32) } | .timer.topic.change 1 1 topic %chan %jtnicks
  }
}
;
on *:NICK:{ var %chan = $channel
  if ($istok(%jtnicks,$nick,32)) {
    if ($reptok(%jtnicks,$nick,$newnick,1,32) != %jtnicks) {
      set -s %jtnicks $v1
      while ($len(%jtnicks) > $max.topic.length) { | var %jtnicks = $gettok(%jtnicks,2-,32) } | .timer.topic.change 1 1 topic %chan %jtnicks
    }
  }
}

#121784 02/06/05 04:37 PM
Joined: Apr 2005
Posts: 38
J
juble Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Apr 2005
Posts: 38
wow thanks guys
specially DaveC
smile

#121785 03/06/05 12:22 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
no problems

hmmm just saw something to fix

see all the set -s they should just be set so the value isnt displayed as its set, i left them in when i was testing it.


Link Copied to Clipboard