mIRC Home    About    Download    Register    News    Help

Print Thread
#43628 22/08/03 09:08 PM
D
DeadlySin
DeadlySin
D
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

#43629 22/08/03 09:12 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Umm, use
Code:
on *:JOIN:[b]#[/b]: { 
  if ($chan == #Channel) {
  }
}

#43630 22/08/03 09:24 PM
D
DeadlySin
DeadlySin
D
thx put how would i now if they r saved and were can i get em from

#43631 22/08/03 09:25 PM
P
pheonix
pheonix
P
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

Last edited by pheonix; 22/08/03 09:27 PM.
#43632 22/08/03 09:26 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
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
}
}


#43633 23/08/03 03:02 AM
C
CyBot
CyBot
C
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
}
}

#43634 23/08/03 03:45 AM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Why would I want to try that?

#43635 23/08/03 02:32 PM
B
bloupx
bloupx
B
yet another totally useless code example by msn chatter pheonix smile

#43636 23/08/03 02:41 PM
P
pheonix
pheonix
P
* pheonix has been specifically told by tjerk to ignore ignorant lying people like you :tongue:

#43637 23/08/03 02:43 PM
Joined: Dec 2002
Posts: 2,958
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Dec 2002
Posts: 2,958
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.

#43638 23/08/03 02:44 PM
P
pheonix
pheonix
P
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.......

#43639 23/08/03 02:46 PM
Joined: Dec 2002
Posts: 2,958
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Dec 2002
Posts: 2,958
And how many channels can you mass-join in the fashion you describe without getting killed? Not many.

#43640 23/08/03 02:47 PM
P
pheonix
pheonix
P
ah yeah, got ya, o well its whats he asked for....

#43641 23/08/03 03:44 PM
B
bloupx
bloupx
B
i'm a man of few words..

#43642 23/08/03 03:44 PM
Joined: Dec 2002
Posts: 2,958
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Dec 2002
Posts: 2,958
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.


Link Copied to Clipboard