Skip to content
General Chat Talk

Would It Be Possible

A TG007 community discussion started by Johnson.

Discussion 18 posts
Page 1 of 1
Open
Topic #9989 · 18 published posts · 3,204 views

:oops: I dont know if this is a silly question but iv just got to ask it ... when your script leaves i.e disconnected from the server or whatever ? is there a way of putting a sound code in your script to alert you to this ? ... For example people can page me when im not at my pc but close by .. I have plenty of wav sounds if its possible :D

 

on *:TEXT:*!page*:#:{ 
  /set -u3 %smsg $2-
  write paging.txt $nick - %smsg
  { splay Page.wav }
  msg # $nick Is Paging you 
}

Edited Apr 17, 2008 9:37 AM by Lynx

yep, it's heaps do-able...

if you refer to the help file and look at "on disconnect", you can work it out.

Though here's the code...

on *:DISCONNECT: { splay Page.wav }

yep, it's heaps do-able...

if you refer to the help file and look at "on disconnect", you can work it out.

Though here's the code...

on *:DISCONNECT: { splay Page.wav }

 

:lmaojump: Thanks TGK to be honest with you I never seem to look at help in mirc ... plus most times I dont understand it ... also I did this and put one of these * to many lol

 

On*:Disconnect:* { spray disconnect.wav }

 

The reson I put the extra * in was ... I have this code for sound and was looking at that :D

 

on *:Join:*:{ splay join.wav }
on *:Part:*:{ splay leave.wav }

 

and if you notice it has an extra * i.e. on*:join:* ... but im learning with help from people like you ... again TGK Thankyou Very Much

 

 

 

 

If you use a socket to connect to the server you won't really have a disconnect event. You would need to check if the socket closes and if it does do your /splay sound.wav.

If you use a socket to connect to the server you won't really have a disconnect event. You would need to check if the socket closes and if it does do your /splay sound.wav.

 

 

:lmaojump: Hi travis mate ... it works fine ... its a funny old world i hadnt put that code into my script before i was disconnected from the server and it yelled at me loud and clear :D The only other thing is when it does disconnect for whatever reason it doesnt autojoin the room ? i have to do that manually :(

Look in the mIRC options on that. If not then its a simple fix... let me know and i'll help you out.

The Internet: where men are men, women are men, and children are FBI agents.

Look in the mIRC options on that. If not then its a simple fix... let me know and i'll help you out.

 

iv gone to mirc Options and IRC/options ... iv ticked rejoin channel when kicked /rejoin channel on connect / keep channel open ... but it still doent rejoin :(

TGK had something for that on MSN. He might be able to fix it for whatever server your on. Or, x-cOn will help you.

mIRC Options:

 

Connect > Options >

 

  • Reconnect on Disconnect

 

Check For Timed Out Connection (this one can be a pain, it may dc you thinking your connection timed out)

 

 

Retry Button:

 

  • Enable Connect Retry

 

Set settings as you wish.

 

IRC >

 

  • Rejoin Channels on Connect

 

Keep Channels Open

 

With all of these selected it should reconnect you if you are using basic mirc to connect to the server and rooms. Rooms will stay open and you should rejoin the rooms on re-connect.

 

Sometimes when we have special ways to connect to the server mIRC doesn;t automatically rejoin the rooms well.

 

On *:Disconnect:{

 

$chan(0) returns total number of channels. Then a while loop will give you names. $chan(1) etc. So you can store all rooms you were in, reconnect using your reconnect alias, then join those rooms. Here is a sample while loop for this sort of situation. Note, seperate the rooms names with a comma so I can utilize the multi-room join command. /join room1,room2,room3

 

 

on *:disconnect:{
var %cx = $chan(0) | while (%cx) {
%channels = $addtok(%channels,$chan(%cx),44)
dec %cx
}
;Command to connect to your server goes here.

;Now you either set the rooms as a global variable and whatever raw or SNOTICE tells you you are connected, or the on *:connect event, is where you /join %channels

;Or you can use a timer but I prefer to be positive Im connected before joining rooms.
;I will use the Connect event. SO I need to set a variable telling the connect event that I just dc'd.

set -u5 %dc $server

}

on *:connect:{
if (%dc == $server) {
join %channels
unset %dc %channels

}

}

 

This is the basic idea, without testing it on your server and with your connection I cannot be sure. But this is pretty much how you do it manually.

Edited Apr 17, 2008 10:20 PM by Travis

Thanks Travis .. iv done everything you have told me to do i.e >>>

 

mIRC Options:

Connect > Options >

Reconnect on Disconnect

Check For Timed Out Connection (this one can be a pain, it may dc you thinking your connection timed out)

Retry Button:

Enable Connect Retry

Set settings as you wish.

 

IRC >

Rejoin Channels on Connect

Keep Channels Open

 

I will let you know if they that helps me 1st ^^^^^^^^^^

 

I use my script in sparkpea ... but i will keep that code if you dont mind and try it out late .. again as i always say Thankyou for your help on this one :D

Sparkpea still popular?

Edited Apr 17, 2008 6:50 PM by x-cOn

The Internet: where men are men, women are men, and children are FBI agents.

:oops: is there a way of testing your script for disconnection and rejoin please ... as i went to file and disconnect just to see lol if it would re-connect :D

I dont know that that would reconnect you. Try typing /disconnect and pressing enter.

 

 

If you have questions about the code I presented and/or need somethign clarified please ask.

i'll explain this a bit better...

 

If you are using a connection to connect to a server (meaning that someone has made a socket connection and you have it in your script, to connect to that server), you CANNOT use the auto reconnect on disconnect feature, as it will try and reconnect to "localhost", which is actually your laptop, not the server. This is because the socket connection script is making the connection for mIRC, not allowing mIRC to do it itself.

 

The options given above is merely if you use the "/connect <my server> [<port number>]" (<> = required, [] = optional).

 

If you use the /connect method, you will be able to use the internal mIRC auto reconnect. It will just continually try and reconnect till it can.

 

X is right, i did have a feature like this is my connection, DogCollar, which made it VERY handy because you could ensure pretty much maximum time in the room, and with the AUTO CREATE feature, you would pretty much always have your room open (as MSN didn't have a "register my room" function). But this was something i made in DogCollar. The creator of the connection would need to implement it, unless you are good enough to make it yourself.

I dont know that that would reconnect you. Try typing /disconnect and pressing enter.

 

 

If you have questions about the code I presented and/or need somethign clarified please ask.

 

:oops: yes i put your code into my script and did the /disconnect :oops: had to use task master as everything didnt respond and to be sure it was the code i tried it without and everything was fine ... but thankyou and im grateful for the help ... im using sparkpea which suits myself and my members.

The creator of the connection would need to implement it, unless you are good enough to make it yourself.

 

:lmaojump: TGK Thankyou very much for your reply im very grateful ... im following some of what you are saying but not all :( ... im using vincula in sparkpea ... as for above ^^^^^ in the quote no mate im not good enough to do it myself :(

 

Lynx, the code I presented was a guideline. It didn't have the commands to connect to your server. Also, I accidentally left the $ off the $chan(0) identifier which is why you had the recursive loop. I've fixed it, but again, it is missing the code to connect to your server and it would really need to be written with your connection and server in mind.

 

I had suggested using the mirc auto-reconnect feature when typing /disconnect. But yes, that would also be a good way to test the type of code I showed you.

Edited Apr 17, 2008 10:25 PM by Travis
Sparkpea still popular?

 

 

:lmaojump: yes as always ;) .. till having that problem wiv the disconnection .. is it the vincula connection plz :(