mIRC Home    About    Download    Register    News    Help

Print Thread
#128494 26/08/05 05:56 AM
Joined: Jan 2005
Posts: 25
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Jan 2005
Posts: 25
very basic one really

I can get it to relay text here and there with

Code:
 on *:text:*:#channel: { /msg #otherchannel $nick $1- }  


but I am having trouble when it comes to actions/joins/parts/quits etc

any help?

#128495 26/08/05 08:08 AM
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
on *:text:*:#chan: { /msg #tested $nick $1- }
on *:action:*:#chan: { /msg #tested $nick $1- }

Both the text and action events will output "nick body-of-text", the on notice event will work in this way also

on *:join:#chan: { /msg #tested $nick $1- }
on *:part:#chan: { /msg #tested $nick $1- }

The join event will output "nick" with no extented text from $1- as none is ever sent. The part event will output "nick [part-reason-if-present]", note that the join and part events do not have a matchtext field.

on *:quit: if ($nick ison #chan) { /msg #tested $nick $1- }

The quit event is global and not channel specific, therefor does not have a location field, but a simple if $nick ison #chan will return true if the quitter was present on that channel. The quit event will output "nick [quit-reason-if-present]"


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
#128496 26/08/05 01:58 PM
Joined: Jan 2005
Posts: 25
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Jan 2005
Posts: 25
how would I set it so that it includes the necessary information

SoandSo (blah@hostname.net) joins #channel

?

#128497 26/08/05 02:11 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
on *:join:#chan: { /msg #tested $nick ( $+ $address($nick,5) $+ ) joins $chan }


Invision Support
#Invision on irc.irchighway.net
#128498 26/08/05 02:38 PM
Joined: Jan 2005
Posts: 25
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Jan 2005
Posts: 25
yeah, I just figured that one out :S

now if I could only get my whois to work

Code:
on *:TEXT:.whois *:#channel: {
/scid 11 //set -s %whois $address($2, 5) | //set -s %serverwhois $server
/scid 2 /msg #channel $2 ( $+ %whois $+ ) on %serverwhois
}


multiserver whois basically

#128499 26/08/05 10:00 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Quote:
yeah, I just figured that one out :S

now if I could only get my whois to work

Code:
on *:TEXT:.whois *:#channel: {
/scid 11 //set -s %whois $address($2, 5) | //set -s %serverwhois $server
/scid 2 /msg #channel $2 ( $+ %whois $+ ) on %serverwhois
}


multiserver whois basically


welp I can help you here replace channel with whatever you want and channels with whatever you want keep the variables the same name because why? well at the end of this scipt i put unset %whois* which by adding a * toghter with %whois unsets all variables that start with %whois

btw, if you need explanation on how this works just say it... I forgot also to mention that the SCID ID's need to be changed with whatever window you got i hope you know exactly how these scid's work smile because on your first you you put 11 this would mean the 11th server session

well since no one replyed here yet and i still have availability to edit script ill add reasons why it works or i mean just notes just to let you know you can copy and paste the whole thing because even though theres something like ; sjklfafjfkljsfklfkl < it will not be executed in the script at all

Code:
on *:TEXT:*:#channelhere: {
  if ($1 == .whois) { 
    %whois.nick = $2
    scid 2 { if (%whois.nick ison #testand) { %whois.address = $address(%whois.nick,5) | %whois.server = $server }
      else { goto end }
      scid 1 /msg #chaotic $nick $+ , ( $+ %whois.nick $+ ) is on %whois.server
    } 
    :end
    unset %whois*
  }


on *:TEXT:*:#channelhere: {
; You can replace #channelhere with the channel or put a wildcard to both use command in either query or channel
if ($1 == .whois) {
; basically im telling the script if the first word in the text giving by a person is .whois then we execute the commands below...
%whois.nick = $2
; We are setting a variable %whois.nick = $2 which $2 = second word in script ex:. .whois johndoe
scid 2 { if (%whois.nick ison #testand) { %whois.address = $address(%whois.nick,5) | %whois.server = $server }
; now example this is for server connection 2 so if %whois.nick which really again equals to the same has $2 above and ison #channelwhatever then we set 2 variables %whois.address = $address(%whois.nick,5) and put a line break within the same file which it looks like you already know them and do the second variable %whois.server = $server
else { goto end }
; now if the above is false where %whois.nick is NOT on the channel it will go to else which we point the script to go to :END at the bottom as you can see instead of executing the next following command below this note
scid 1 /msg #chaotic $nick $+ , ( $+ %whois.nick $+ ) is on %whois.server
; Well this portion is sell explanatory i just changed your varible and scid and added a few things
}
:end
; :end is important again its whats called a pointer so if a certain thing is said or done you can tell a script to go there and use another portion of script now it didnt neccesarly needed to be called :END but it makes it easier to follow through on very long script sniplets
unset %whois*
; This will unset all variables that start with %whois because of the * being added at the end
}

Enjoy m8

Last edited by Lpfix5; 26/08/05 11:59 PM.

Link Copied to Clipboard