mIRC Homepage
Posted By: vinnie19 Connect to server and msg - 17/04/08 01:35 PM
I got a script:

Code:
on *:START:{ 
  server -pfo server1 -j #room1 server1
  server -pfo server1 -j #room2 server1 
  server -pfom server2 -j #room1 server2  
}


But that doenst work correct.
When i now start mirc it connects to:
Server 1 - room2
and to server 2 room 1

How do i make it that it connects to but rooms on server1
And how do i punt a 4th one in (server2 room2)?

Next i want to send on both servers this message on connect:
Code:
/msg Nickserv identify pass

How do i do this?
Posted By: RoCk Re: Connect to server and msg - 17/04/08 02:07 PM

Code:

on *:START:{ 
  server -pfo server1 -jn #room1,#room2
  server -pfom server2 -jn #room1,#room2
}

on *:CONNECT: {
  if (($server == server1) || ($server == server2)) .msg Nickserv identify pass
}



In the CONNECT event, I would use the network names instead of server names.

if (($network == network1) || ($network == network2)) .msg Nickserv identify pass
Posted By: vinnie19 Re: Connect to server and msg - 18/04/08 01:02 PM
Code:
on *:START:{ 
  server -pfo server1 -jn #room1,#room2
  server -pfom server2 -jn #room1,#room2
}


And where do i need to putt the password of the room?
Because when i use this:

Code:
on *:START:{ 
  server -pfo server1 -jn #room1,#room2 pass
  server -pfom server2 -jn #room1 pass,#room2 pass
}


It doenst connect to the second rooms.
Posted By: RoCk Re: Connect to server and msg - 18/04/08 02:15 PM

Have you considered using perform on connect? If you want to do it with a script, then you would have to put your joins in the CONNECT event if you need to use a password...

Code:

on *:START:{ 
  server -pfo server1
  server -pfom server2
}

on *:CONNECT: {
  if (($server == server1) || ($server == server2)) {
    .msg Nickserv identify pass
    .timer 1 2 join #room1 pass
    .timer 1 3 join #room2 pass
  }
}


Posted By: vinnie19 Re: Connect to server and msg - 18/04/08 06:40 PM
but how does it then reconnize on which server he must connect to that room.

Posted By: RoCk Re: Connect to server and msg - 18/04/08 07:38 PM

Different channels on different servers?

Code:

on *:START:{ 
  server -pfo server1
  server -pfom server2
}

on *:CONNECT: {
  if ($server == server1) {
    .msg Nickserv identify pass
    .timer 1 2 join #room1 pass
    .timer 1 3 join #room2 pass
  }
  elseif ($server == server2) {
    .msg Nickserv identify pass
    .timer 1 2 join #room3 pass
    .timer 1 3 join #room4 pass
  }
}



Correct?
Posted By: vinnie19 Re: Connect to server and msg - 18/04/08 07:55 PM
Thx the last one works great.

Thank you very much.

And if i want to sent a message to a room inmeddiatly.

Because i want to send on server1 room2 the message !op if im connected to that room

How do i do that?
Posted By: RoCk Re: Connect to server and msg - 18/04/08 08:02 PM

Code:

on *:START:{ 
  server -pfo server1
  server -pfom server2
}

on *:CONNECT: {
  if ($server == server1) {
    .msg Nickserv identify pass
    .timer 1 2 join #room1 pass
    .timer 1 3 join #room2 pass
  }
  elseif ($server == server2) {
    .msg Nickserv identify pass
    .timer 1 2 join #room3 pass
    .timer 1 3 join #room4 pass
  }
}

on *:JOIN:#: {
  if (($server == server1) && ($chan == #room2)) msg $chan !op
}


Posted By: vinnie19 Re: Connect to server and msg - 21/04/08 05:23 PM
Thx for the code. I needed to modify it a little bit so this is my code now

Code:
on *:START:{ 
  server -pfo server1
  server -pfom server2
}

on *:CONNECT: {
  if ($server == server1) {
    .msg Nickserv identify pass
    .timer 1 2 join #room1 pass
    .timer 1 3 join #room2 pass
  }
  elseif ($server == server2) {
    .msg Nickserv identify pass
    .timer 1 2 join #room3 pass
    .timer 1 3 join #room4 pass
  }
}

on *:JOIN:#: {
  if (($server == server1) && ($chan == #room2)) && ($nick == mynick) msg $chan !op
}


But its working great thx very much
Posted By: RusselB Re: Connect to server and msg - 21/04/08 11:15 PM
you could modify the ON JOIN event to read
Code:
on me:*:join:#room2: if ($server == server1) msg # !op

Posted By: xyzzy Re: Connect to server and msg - 29/04/08 10:33 AM
Code:
on *:connect:{
  if ($network == server1) { 
    .ns identify pass1
    .mode $me +B-GTi  { halt }
  }
  elseif ($network == server2) { 
  .ns identify pass2
  .mode $me +B-GTi | halt }}
  }
}

whats the wrong ? cos i got that msg > == Unknown command
Posted By: RoCk Re: Connect to server and msg - 29/04/08 12:13 PM

Code:

on *:connect: {
  if ($network == server1) { 
    .ns identify pass1
    .mode $me +B-GTi
  }
  elseif ($network == server2) { 
    .ns identify pass2
    .mode $me +B-GTi
  }
}


Posted By: xyzzy Re: Connect to server and msg - 29/04/08 12:53 PM
thnx RoCk but the still same also if i use any services command again got the msg
(15:53:27) -NickServ- Syntax: SET option parameters
~
(15:53:27) -NickServ- Type /msg NickServ HELP SET for more information.
~
== Unknown command
~
Posted By: RoCk Re: Connect to server and msg - 29/04/08 01:12 PM

Well I would say it's another script causing it because you aren't sending the SET command to NickServ in this one. Also, you should be using $server instead of $network in this.

Either this
if ($network == your_network_name)

or this
if ($server == your_server_name)
Posted By: xyzzy Re: Connect to server and msg - 29/04/08 02:06 PM
After Connected it work like that
~
== Unknown command
~
(17:02:37) * Xyzzy sets mode: +B-iG
~
(17:02:37) -NickServ- Password accepted -- you are now recognized.
~
(17:02:38) * Xyzzy sets mode: +i
then i try any command it gives always same thing
(17:03:17) -NickServ- Syntax: SET option parameters
~
(17:03:17) -NickServ- Type /msg NickServ HELP SET for more information.
~
== Unknown command
~
(17:04:16) -ChanServ- Password accepted -- you now have founder-level access to #Xyzzy
~
== Unknown command
~
Posted By: RoCk Re: Connect to server and msg - 29/04/08 02:12 PM

It looks to me like it might be a script error in a NOTICE event.
Posted By: xyzzy Re: Connect to server and msg - 29/04/08 02:19 PM
Code:
on *:notice:*:*: {
  if (%notice. [ $+ [ $wildsite ] ] == $null) %%(nick == chanserv) { return } {
    set -u5 %notice. [ $+ [ $wildsite ] ] 1
    return
  }
  else { inc %notice. [ $+ [ $wildsite ] ] }
  if (%notice. [ $+ [ $wildsite ] ] > 5 && %notice.check == $null) {
    set -u6 %notice.check 1
    .ignore -nu10 $wildsite
    echo -s *** Notice flood from $wildsite - Ignoring notices for 15secs...
  }
}

yup i find this after u said if del this code there is not any prob but also i need this notice flood prot too hmmm anything to do use both of them ? also thnx for lucky guess i cant find it without ur that msg.. smirk
Posted By: Horstl Re: Connect to server and msg - 29/04/08 02:31 PM
Code:
%%(nick == chanserv)

I suppose you meant:
Code:
&&  ($nick == chanserv)
Posted By: xyzzy Re: Connect to server and msg - 29/04/08 02:34 PM
yup i did try both ($nick / (nick
~
(NICK Unknown command
~
($NICK Unknown command
~ mad codes making me mad lol
Posted By: Horstl Re: Connect to server and msg - 29/04/08 02:41 PM
Code:
on *:notice:*:*: {
  if (!$istok(nickserv chanserv botserv hostserv memoserv ...,$nick,32)) {
    hinc -mu5 noticeflood $wildsite
    if ($hget(noticeflood,$wildsite) > 5) { 
      .ignore -nu15 $wildsite
      echo -s  *** Notice flood from $wildsite - Ignoring notices for 15secs...
    }
  }
}

A quick alternative suggestion for notice floodprotection - maybe you like it smile
Posted By: xyzzy Re: Connect to server and msg - 29/04/08 02:59 PM
(: thnx :P how much thnx u got to day ? :P lol
cya in other code :P n other thnxsss wink
it works well..
© mIRC Discussion Forums