mIRC Homepage
Posted By: dude22072 writeini & msg #???? - 18/05/14 12:40 AM
currently i have
Code:
on *:text:!editme*:#: {
  if ( $regex($2-, \.com) ) { msg $chan $nick --> Communicate THIS! (No links allowed in !whoisuser message) }
  if ( $regex($2-, \.co) ) { msg $chan $nick --> Who uses .co anymore? Kappa (No links allowed in !whoisuser message) }
  if ( $regex($2-, \.net) ) { msg $chan $nick --> Net of webs! NOPE. (No links allowed in !whoisuser message) }
  if ( $regex($2-, \.org) ) { msg $chan $nick --> Orginizaation of MY ASS! (No links allowed in !whoisuser message) }
  if ( $regex($2-, \.de) ) { msg  $chan $nick --> what is that, german? (No links allowed in !whoisuser message) }
  if ( $regex($2-,\/join) ) { msg $chan $nick --> Im will not join any channel but RNG's and dudes! }
  else { .writeini users.ini $nick Message $2-}
}

I was wondering if i could do something so on the ELSE when it does .writeini it could also say a message so that the user knows it's been edited?
Posted By: Nillen Re: writeini & msg #???? - 18/05/14 12:42 AM
Code:
  else { msg # Message goes here | .writeini users.ini $nick Message $2- }
Posted By: dude22072 Re: writeini & msg #???? - 18/05/14 01:05 AM
Thank you once again
Posted By: Nillen Re: writeini & msg #???? - 18/05/14 01:39 AM
Just a note: Your write line will still trigger on any event apart from the last one since you're not using elseifs properly.
Change all if apart from the first one to elseif otherwise the script will always write to the ini file even when another line triggered. Since you didn't specify it to halt.
Posted By: dude22072 Re: writeini & msg #???? - 18/05/14 06:32 AM
Originally Posted By: Nillen
Just a note: Your write line will still trigger on any event apart from the last one since you're not using elseifs properly.
Change all if apart from the first one to elseif otherwise the script will always write to the ini file even when another line triggered. Since you didn't specify it to halt.


didn't see this message sooner, came up with my own method:
Code:
on *:text:!editme*:#: {
  var %allowed
  %allowed = true
  if ( $regex($2-, \.com) ) { msg $chan $nick --> Communicate THIS! (No links allowed in !whoisuser message) | %allowed = false }
  if ( $regex($2-, \.net) ) { msg $chan $nick --> Net of webs! NOPE. (No links allowed in !whoisuser message) | %allowed = false }
  if ( $regex($2-, \.org) ) { msg $chan $nick --> Orginizaation of MY ASS! (No links allowed in !whoisuser message) | %allowed = false }
  if ( $regex($2-, \.de) ) { msg  $chan $nick --> What is that, German? (No links allowed in !whoisuser message) | %allowed = false }
  if ( $regex($2-, \.fr) ) { msg $chan $nick --> Au revoir, Mademoiselle Link! (No links allowed in !whoisuser message) | %allowed = false }
  if ( $regex($2-,\/join) ) { msg $chan $nick --> Im will not join any channel but RNG's and dudes! | %allowed = false }
  if ( $regex($2-,\.color) ) { msg $chan $nick --> Nice try, but I will always be the colour firebrick\! | %allowed = false }
  if ( $regex($2-,\/mod) ) { msg $chan $nick --> You\! Shall\! Not\! Mod\! Nice try sir\/madam\. | %allowed = false }
  if ( $regex($2-,\/unmod) ) { msg $chan $nick --> Unmoding\? Nice try\. Mods are mods for a reason, and they'll stay that way until further notice\. | %allowed = false }
  else { if ( %allowed == true) { msg $chan $nick --> Your \!whoisuser has been edited to: $2- | .writeini users.ini $nick Message $2- } }
}
Posted By: Loki12583 Re: writeini & msg #???? - 18/05/14 01:42 PM
That's still bad. Just use elseif properly.

If I were to type "x .com.net.org.de.fr/join.color/mod/unmod" you would message the channel 9 times.
© mIRC Discussion Forums