mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2007
Posts: 2
M
Bowl of petunias
OP Offline
Bowl of petunias
M
Joined: Sep 2007
Posts: 2
I'm writing an autoconnect script that autoconnects to server, changes your nick, auto identifies, and set modes. So far I have this:

Code:
alias connect {
  if ($readini(autoconnect.ini,servers,server $+ %x) != $null) {
    if %x = 1 { /server $readini(autoconnect.ini,servers,server $+ %x) }
    else { /server -m $readini(autoconnect.ini,servers,server $+ %x) }
  }
}

on 1:CONNECT: {
  if ($readini(autoconnect.ini,nicks,nick $+ %x) != $me) { /nick $readini(autoconnect.ini,nicks,nick $+ %x) }
  if ($readini(autoconnect.ini,passwords,password $+ %x) != N/A) { /nickserv identify $readini(autoconnect.ini,passwords,password $+ %x) }
  if ($readini(autoconnect.ini,modes,modes $+ %x) != N/A) { /mode $me $+ $chr(32) $+ $chr(43) $+ $readini(autoconnect.ini,modes,modes $+ %x) }
  %x = %x + 1 | connect
}


I get an error "$nick No such nick/channel", after it connects and changes the nick and set modes. I know /nick and /mode is causing it. /mode works if the nick isn't changed.

Joined: Sep 2007
Posts: 32
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Sep 2007
Posts: 32
no need for the $chr(43) or $chr(32)
simply use; mode $me +modehere


on me:*:JOIN:#: { .raw part # $crlf join # }

Link Copied to Clipboard