mIRC Homepage
Posted By: Angel_SL Script doesnt work as expected - 20/01/06 06:05 AM
my script doesnt work as expected. its a ircop application.
alias ircopapp1 {
/msg $$1 Thank you for wanting to apply. Please select a password
on *:MSG:*:?$nick:{
/echo Password for $nick IRCop Application: $1
/msg $nick Password accepted.
}
/msg $nick Please select a username.
on *:MSG:*:?$nick:{
/echo Username for $nick IRCop App: $1
/msg $nick Username accepted. Application complete. Please wait while I do some things. You will be notified in help channel when it is complete.
}
}
Posted By: MikeChat Re: Script doesnt work as expected - 20/01/06 06:17 AM
on *:text:!set *:?:{
if ($2 == password) { do something to $$3 | msg $nick your password is now $3 }
if ($2 == username) { do something to $3 | msg $nick your username is now $3 }
}
so they would post to you
!set password (some password)
or
!set username (some username)
Posted By: Angel_SL Re: Script doesnt work as expected - 20/01/06 06:26 AM
Now i get 4:26:16 ] · · Error : /on is an unknown command
[ 14:26:17 ] · · Error : /on is an unknown command
also the script:
alias ircopapp1 {
/msg $$1 Thank you for wanting to apply. Please select a Username and password in syntax: username password
on *:text:!set *:?:{
if ($2 == ????????*) { echo pass $2 | msg $nick Password Accepted. $2 }
if ($3 == ????*) { echo user $3 | msg $nick Username Accepted. $3 }
}
}
Posted By: DimWatt Re: Script doesnt work as expected - 20/01/06 06:29 AM
On msg events cannot go inside an alias. I moved your commands around and put the on msg by them self

Code:
on *:text:!pass:*:{
  /write c:\Program Files\mIRC\ircopapp.txt $3
  /msg $nick Password accepted.
  /msg $nick Please type !username YourUsername.
}
on *:text:!username:*:{
  /echo Username for $nick IRCop App: $1
  /msg $nick Username accepted. Application complete. Please wait while I do some things. You will be notified in help channel when it is complete.
}

alias ircopapp1 {
  /msg $$1 Thank you for wanting to apply. Please type !pass YourPassword
}


The on TEXT could be combined into one with if statements.
I also changed the msg being sent to reflect the changes I made
!pass triggers the first on msg.
!username triggers the second
however you were calling the alias will still work.

oops! guess I should have checked to see if there was a on msg event :tongue:
changed msg to text
I changed echo in the first on TEXT to write as an example of what mike is talking about doing something with $3
Posted By: MikeChat Re: Script doesnt work as expected - 20/01/06 06:33 AM
you are going to have to post your code here;
you must have gotten it tangled with something else.
Also that was not complete, but an example of the event
You had "on msg, there is no "on msg" event
type /help on text
that is the section of the help file you need to go over to start.

I would also look at saving the data (the "do something to $3 part)
I know you are going to code it in to the IRCd if they are IRCOps
but you may want to store the info temporarily til you get it in the conf and rehash
© mIRC Discussion Forums