mIRC Homepage

Save Join

Posted By: DeadlySin

Save Join - 22/08/03 09:08 PM

Can any1 give me a command where i can save my joinings or add them sum where? so then i dont have to keep going on join then typing wot chan i want to go in

Thx
Posted By: SladeKraven

Re: Save Join - 22/08/03 09:12 PM

Umm, use
Code:
on *:JOIN:[b]#[/b]: { 
  if ($chan == #Channel) {
  }
}
Posted By: DeadlySin

Re: Save Join - 22/08/03 09:24 PM

thx put how would i now if they r saved and were can i get em from
Posted By: pheonix

Re: Save Join - 22/08/03 09:25 PM

on *:JOIN:#:{
if (!$read(mychannels.txt,w,$+(*,$server,-,$chan,*)) {
write mychannels.txt $server $+ - $+ $chan
}
}
alias joinchans {
var %i 1
while (%i <= $lines(mychannels.txt)) {
.echo -q $iif(!$window($+(*,$gettok($read(mychannels.txt,%i),1,45),1),*),server -m $gettok($read(mychannels.txt,%i),1,45) -j $gettok($read(mychannels.txt,%i),2,45),join $gettok($read(mychannels.txt,%i),2,45))
inc %i
}
}
this will save every channel on every server you join to mychannels.txt then just type: /joinchans to join them smile
Posted By: SladeKraven

Re: Save Join - 22/08/03 09:26 PM

That wouldn't be saved, that is just so you don't have to specify a channel..
Try
Code:
on 1:JOIN:#: {
if ($nick == $me) {
write Channel.txt $chan
}
}

Posted By: CyBot

Re: Save Join - 23/08/03 03:02 AM

Try this:

on 1:JOIN:#: {
if ($nick == $me) {
var %a 1
while ($readini(channels.ini,Chan-List,%a) != $null) && ($readini(channels.ini,Chan-List,%a) != #) {
inc %a 1
}
writeini channels.ini Chan-List %a #
}
}
alias joinmychans {
var %a 1
while ($readini(channels.ini,Chan-List,%a) != $null) {
join $readini(channels.ini,Chan-List,%a)
inc %a 1
}
}
Posted By: SladeKraven

Re: Save Join - 23/08/03 03:45 AM

Why would I want to try that?
Posted By: bloupx

Re: Save Join - 23/08/03 02:32 PM

yet another totally useless code example by msn chatter pheonix smile
Posted By: pheonix

Re: Save Join - 23/08/03 02:41 PM

* pheonix has been specifically told by tjerk to ignore ignorant lying people like you :tongue:
Posted By: Watchdog

Re: Save Join - 23/08/03 02:43 PM

this will save every channel on every server you join to mychannels.txt then just type: /joinchans to join them

Yeah, and flood the hell out of the server too in most cases, assuming that the script works.
Posted By: pheonix

Re: Save Join - 23/08/03 02:44 PM

how will that flood?, it checks the windows you have open to see if that server is already open, if not it opens it, then joins each channel on each server.......
Posted By: Watchdog

Re: Save Join - 23/08/03 02:46 PM

And how many channels can you mass-join in the fashion you describe without getting killed? Not many.
Posted By: pheonix

Re: Save Join - 23/08/03 02:47 PM

ah yeah, got ya, o well its whats he asked for....
Posted By: bloupx

Re: Save Join - 23/08/03 03:44 PM

i'm a man of few words..
Posted By: Watchdog

Re: Save Join - 23/08/03 03:44 PM

No-one has yet bothered to establish whether the user is looking to save favourite rooms or different rooms each time he uses IRC. If he wants a given set of rooms "save[d] somewhere" then he should use mIRC's built in favourite channels dialogue or the Perform function:

/join #Room1,#Room2,#Room3,#Room4,#Room5

That is one command which sends a total of six commands instead of ten to the server, resulting in a far less chance of being disconnected. (1 x JOIN and 5 x MODE)

If the user wants to save a different set of rooms each time then he'd then use a script and one that definitely does not contain a loop since a loop just increases what you are sending. If you'd have tested what you typed here then you'd have got cut off after joining three or four rooms.
Code:
#Joinall on
ON ME:*:JOIN:#: {
  if (# $+ $chr(44) !isin $read($server $+ .mrc)) {
    write -ci $server $+ .mrc $read($server $+ .mrc) $+ # $+ ,
  }
}
ON ME:*:PART:#: {
  write -ci $server $+ .mrc $remove($read($server $+ .mrc),# $+ $chr(44))
}
ON *:CONNECT: {
  joinall
}
alias joinall {
  if ($read($server $+ .mrc) != $null) {
    join $read($server $+ .mrc)
  }
}
#Joinall End
This is probably not perfect but it does what the user may want and won't flood him off unless he's planning on joining a fairly substantial amount of rooms. When he parts one before leaving the relevant server, that room is removed from 'memory' and is not rejoined when he logs in next. One thing to remember out of all this though is that if he has "Rejoin rooms on reconnect" enabled then it's going to work along-side any script so it would need to be turned off. /enable #joinall to turn on and /disable #joinall to turn off.

Lastly this is tested on two networks and is fully functional.

One possible modification is to change $server to $network though I am not sure whether all IRCd's support $network or not.
© 2020 mIRC Discussion Forums