MEGAMIND

  • Hero Member
  • Developer of "Web-Net" search engine
  • Posts: 569
IRC admin
«  »
its been a long time or probably few years i havent touched irc so can i get some hints again that how would i make my self admin in irc

like if i say .hi so the text would display as [admin] username : sup ppl

kennedyarz

  • Sr. Member
  • Making American Great Again
  • Posts: 334
Re: IRC admin
« Reply #1,  »Last edited
Try something like this

Code: [Select]
function LevelTag(lvl)
{
    lvl = (lvl ? lvl:0);
    switch (lvl)
{
        case 2: return "IRC-User";
        case 3: return "IRC-MODERATOR";
case 4: return "IRC-ADMIN";
        case 5: return "IRC-MANAGER";
        case 6: return "IRC-DEVELOPER";
        default: return "IRC.User";
    }
}
 
function lLevelTag(lvl)
{
    lvl = (lvl ? lvl:0);
    switch (lvl)
{
        case 2: return "11";
        case 3: return "7";
        case 4: return "3";
        case 5: return "4";
        case 6: return "12";
        default: return "5";
    }
}

if (cmd)
{
    if (cmd.slice(0,1)  == "." && cmd.len() > 1)           
    {
        local msg = "" + user + ": " + cmd.slice(1);
        if (text) msg = msg + " " + text;
        EchoMessage(lLevelTag(level)+"["+LevelTag(level)+"]"+msg+"");
Message("[#0000CC]["+LevelTag(level)+"][#ffffff]"+msg);
print(LevelTag(level)+""+msg)
    }
}

MEGAMIND

  • Hero Member
  • Developer of "Web-Net" search engine
  • Posts: 569
Re: IRC admin
« Reply #2,  »
Quote from kennedyarz on June 29th, 04:41 PM
Try something like this

Code: [Select]
function LevelTag(lvl)
{
    lvl = (lvl ? lvl:0);
    switch (lvl)
{
        case 2: return "IRC-User";
        case 3: return "IRC-MODERATOR";
case 4: return "IRC-ADMIN";
        case 5: return "IRC-MANAGER";
        case 6: return "IRC-DEVELOPER";
        default: return "IRC.User";
    }
}
 
function lLevelTag(lvl)
{
    lvl = (lvl ? lvl:0);
    switch (lvl)
{
        case 2: return "11";
        case 3: return "7";
        case 4: return "3";
        case 5: return "4";
        case 6: return "12";
        default: return "5";
    }
}

if (cmd)
{
    if (cmd.slice(0,1)  == "." && cmd.len() > 1)           
    {
        local msg = "" + user + ": " + cmd.slice(1);
        if (text) msg = msg + " " + text;
        EchoMessage(lLevelTag(level)+"["+LevelTag(level)+"]"+msg+"");
Message("[#0000CC]["+LevelTag(level)+"][#ffffff]"+msg);
print(LevelTag(level)+""+msg)
    }
}
i have something like this
Code: [Select]
function LevelTag1(lvl) {
lvl = (lvl ? lvl:0);
switch (lvl) {
case 2:
return "IRC Moderator>";
case 3:
return "IRC Admin>";
case 4:
return "IRC Manager>";
case 5:
return "IRC Helper>";
case 6:
return "IRC Owner>";
default:
return "IRC User>";
}
}
function lLevelTag(lvl) {
lvl = (lvl ? lvl:0);
switch (lvl) {
case 2:
return "11";
case 3:
return "7";
case 4:
return "3";
case 5:
return "4";
case 6:
return "12";
default:
return "5";
}
}
function FBSIrcCommand( user, cmd, text )
{
local NickInfo = FindNick( user ), level, tLevel, p;
if ( NickInfo ) level = NickInfo.Level.tointeger();
if (cmd)
{
if (cmd.slice(0,1)  == "." && cmd.len() > 1)
{
local msg = "" + LevelTag1(level) + " " + user + ": " + cmd.slice(1);
if (text) msg = msg + " " + text;
EchoMessage(lLevelTag(level) + msg);
Message("[#00FF15]"+msg+"");
print("(IRC)"+user+" :"+msg+"");
}
}

kennedyarz

  • Sr. Member
  • Making American Great Again
  • Posts: 334
Re: IRC admin
« Reply #3,  »
is the same

Code: [Select]
function FBSIrcCommand( user, cmd, text )
{
    // none of this needs to be touched, it is to do with getting channel levels
    local NickInfo = FindNick( user ), level, tLevel;
    local s = 0, plr;
    if ( text ) { s = NumTok( text, " " ); plr = FindPlayer( text ); }
   
    if ( NickInfo ) level = NickInfo.Level.tointeger();
    //---------------------------------------------------------------------------
   
           if (cmd) {
        if (cmd.slice(0,1)  == "." && cmd.len() > 1)
               
        {
            local msg = "" + user + ": " + cmd.slice(1);
            if (text) msg = msg + " " + text;
            EchoMessage(lLevelTag(level)+"["+LevelTag(level)+"]"+msg+"");
            Message("[#0000CC]["+LevelTag(level)+"][#ffffff]"+msg);
print(LevelTag(level)+""+msg)
        }
    }