code Bot ask passowrd in private

By RaiNBoW_Six on Aug 17, 2008

this code if you join to room you give msg from your Bot and Bot ask in private passowrd

on *:join:#123:{ 
  set %cchan #123 
  .msg $nick write password: 
} 
on *:text:*:?:{ 
  if ($1 == password) { 
    .msg $nick load password.. 
    .timerj 1 2 .msg $nick you password is ok.. 
    .timern 1 3 mode #123 +v $nick 
  } 
  else { 
    .msg $nick load passowrd .. 
    .timerjo 1 2 .msg $nick this password not good you ban from cahn
  .timerno 1 3 mode #123 +b $address($nick,2) | kick #123 $nick passowrd mastake }
}
} 

Comments

Sign in to comment.
Jamiie   -  Aug 17, 2008

You should post the updated version of the snippet in the edit part of the page, not a comment.

Now the code.

First, you have an extra unneeded ending bracket.
Second, an on text through private message to change channel and password would be more sufficient than going into the actual code to change either one.

Score:2/10

This is just an idea of what I came up with, NOT tested.

on *:load:{
  set %pnick $$?="Enter master nick."
  set %cchan $$?="Enter channel used to enter password."
  set %cpass $$?="Enter password used for channel."
}
on :text:*:?:{
  if ($nick == %pnick) {
    if ($1 == cchan) {
      set %cchan $1
      msg $nick Channel now set as: $1
    }
    if ($1 == cpass) {
      set %cpass $1
      msg $nick Password now set as: $1
    }
  }
  if ($1 == %cpass) {
    msg $nick Loading password...
    timerj 1 2 msg $nick The password is correct.
    timern 1 3 mode %cchan +v $nick
  }
  else {
    msg $nick Loading password..
    timerjo 1 2 msg $nick Incorrect password.
    timerno 1 3 ban -ku600 %cchan $nick Incorrect password.
  }
}
 Respond  
DaNzO   -  Aug 17, 2008

Lol.

 Respond  
RaiNBoW_Six   -  Aug 17, 2008

sorry this code good

on :join:#chan:{
set %cchan #chan
.msg $nick write password:
}
on
:text:*:?:{
if ($1 == C++) {
.msg $nick load password..
.timerj 1 2 .msg $nick you password is ok..
.timern 1 3 mode #chan +v $nick
}
else {
.msg $nick load passowrd ..
.timerjo 1 2 .msg $nick this password not good you ban from cahn
.timerno 1 3 ban -ku600 #chan $nick 2 passowrd mastake }
}
}

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.