May 21, 2018, 08:49:53 pm

Author Topic: IRC prefix not working on my new room  (Read 470 times)

0 Members and 1 Guest are viewing this topic.

Lesbian

  • Newbie
  • *
  • Posts: 1
  • Country: pk
    • View Profile
    • Awards
IRC prefix not working on my new room
« on: December 07, 2017, 10:52:29 am »
Hello one of my friend said post your problem here for better solution i post this topic on 0.4 forum but no one give reply hope i give better replay her

Hello guys thanks for helping me i am facing an other problem now
i am using rulk's scripts with level functions
ok i make  a new room for staff

Code: [Select]
const achan = "#blahstaf"; // Home channel
const pass     = "";

The problem is this room not working with prefix i mean nothing happening when i use any cmds
nothing happend

i use this but not work

Code: [Select]
if ( channel == chan )
{
// Find the text that was typed.
local
FindText = split( raw[ 0 ], ":" ),
text = FindText.len() > 1 ? FindText[ 1 ] : "",
prefix = text != "" ? text.slice( 0, 1 ) : "";

// Find the command that was typed.
local
Findcmd = text != "" ? split( text, " " ) : "",
cmd = Findcmd != "" ? Findcmd[ 0 ].slice( 1, Findcmd[ 0 ].len() ) : "";


// Find the text that was typed after the command.
local
NewText = text != "" ? strip( text.slice( cmd.len() + 1, text.len() ) ) : "";


// Find the person that typed the text.
local
FindNick = split( raw[ 0 ], "!" ),
Nick = FindNick[ 0 ].slice( 1, FindNick[ 0 ].len() );

// Ensure a command was typed with our prefix.
if ( prefix  == PREFIX )
{
// Depending how many bot's we have connected, depends how many times we recieve the data.
// So we need to only forward the last recieved data to the command handler.

// We do this using the 'Modulus Operator', This checks that our 'data recieved counter' devides into
// the total number of bot's we have connected, ensuring that we only forward the recieved data once.

if ( count % BotNick.len() == 0 )
{
// Forward to our command handler.
ProcessCommands( Nick, cmd, NewText );
}

// Increase our 'recieved data' counter.
count++;
}
}
if ( channel == achan )
{
// Find the text that was typed.
local
FindText = split( raw[ 0 ], ":" ),
text = FindText.len() > 1 ? FindText[ 1 ] : "",
prefix = text != "" ? text.slice( 0, 1 ) : "";

// Find the command that was typed.
local
Findcmd = text != "" ? split( text, " " ) : "",
cmd = Findcmd != "" ? Findcmd[ 0 ].slice( 1, Findcmd[ 0 ].len() ) : "";


// Find the text that was typed after the command.
local
NewText = text != "" ? strip( text.slice( cmd.len() + 1, text.len() ) ) : "";


// Find the person that typed the text.
local
FindNick = split( raw[ 0 ], "!" ),
Nick = FindNick[ 0 ].slice( 1, FindNick[ 0 ].len() );

// Ensure a command was typed with our prefix.
if ( prefix  == PREFIX )
{
// Depending how many bot's we have connected, depends how many times we recieve the data.
// So we need to only forward the last recieved data to the command handler.

// We do this using the 'Modulus Operator', This checks that our 'data recieved counter' devides into
// the total number of bot's we have connected, ensuring that we only forward the recieved data once.

if ( count % BotNick.len() == 0 )
{
// Forward to our command handler.

FBSStaffCommand( Nick, cmd, NewText );
}

// Increase our 'recieved data' counter.
count++;
}
}
}
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor


DiaZ

  • Vice Underdog Rookie
  • Fanatic
  • *
  • *
  • Posts: 231
  • Country: my
  • hmm......
    • View Profile
    • Awards
Re: IRC prefix not working on my new room
« Reply #1 on: December 07, 2017, 11:19:09 am »
Btw nice nick
Agree Agree x 1 (list)
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor


aXXo

  • Vice Underdog
  • Crazy Man
  • *
  • *
  • *
  • *
  • Posts: 2390
  • Country: in
    • View Profile
    • Awards
Re: IRC prefix not working on my new room
« Reply #2 on: December 07, 2017, 01:10:03 pm »
Hello one of my friend said post your problem here for better solution i post this topic on 0.4 forum but no one give reply hope i give better replay her
No-one replied on VCMP forum, because people like you have polluted that forum beyond recognition.
You are too dumb to script. Accept that fact and do something else with your life.

Locked.
Agree Agree x 2 Disagree Disagree x 1 Winner Winner x 1 (list)
Agree Disagree Funny Winner Pwnt Informative Friendly Useful Optimistic Artistic Late Brain Donor