egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help with Command
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
CyberWar
Voice


Joined: 04 Feb 2008
Posts: 36

PostPosted: Wed Mar 12, 2008 11:07 pm    Post subject: Help with Command Reply with quote

Hi all

me again i know Cool

I've searched this forum for fix it my problem, but i think i'm the first here.

How i can make a command like this for my Bot?.

Code:
.gline <nick> <time> <reason>


This Command is for a spezial team on our irc but i dont know how i can make this, i've tested some things and used google but i can't find a howto or
little script

Thanks for Helping
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Thu Mar 13, 2008 12:28 am    Post subject: Reply with quote

might want to try the really obvious:
Code:
putserv "gline <nick> <time> :<reason>"

RFCs really were created for a good reason....
Back to top
View user's profile Send private message
CyberWar
Voice


Joined: 04 Feb 2008
Posts: 36

PostPosted: Thu Mar 13, 2008 3:48 am    Post subject: Reply with quote

But that is not all? this does not work Confused
Back to top
View user's profile Send private message
user
 


Joined: 18 Mar 2003
Posts: 1452
Location: Norway

PostPosted: Thu Mar 13, 2008 5:07 am    Post subject: Re: Help with Command Reply with quote

CyberWar wrote:
How i can make a command like this for my Bot?

What kind of command? irc/dcc?

(PS: I moved this thread from the Scripting Help forum)
_________________
Have you ever read "The Manual"?
Back to top
View user's profile Send private message
CyberWar
Voice


Joined: 04 Feb 2008
Posts: 36

PostPosted: Thu Mar 13, 2008 7:09 am    Post subject: Reply with quote

Thanks for removing Smile

the kind of command for the irc is:
Code:
.gline <user> <time> <reason>


The Command for IRC
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Mar 13, 2008 10:24 am    Post subject: Reply with quote

Thinking of something like this?
Code:
bind dcc n gline dcc:gline
proc dcc:gline {handle idx text} {
  set data [split $text]
  if {[llength $data] <3} {
    putidx $idx "Usage: .gline <nick> <time> <reason>"
  } {
    puthelp "GLINE [lindex $data 0] [lindex $data 1] :[join [lrange $data 2 end]]"
  }
}

Creates a dcc partyline command named ".gline" that basically sends a "GLINE" command to the irc server with the provided parameters.

Edit: Based upon documentation for Unreal 3.1.1 GLINE
http://www.technerd.net/irc-commands.html
Quote:
*** GLINE command ***

This command provides timed G:Lines. If you match
a G:Line you cannot connect to ANY server on the
IRC network. A time of 0 in the GLINE makes it permanent (Never Expires).
In Unreal 3.1.1 you may also specify the time in the format 1d10h15m30s.
IRC Operators only.

Syntax: GLINE <user@host mask> <seconds to be banned> :<reason> (Adds a G:line for user@host)
GLINE -<user@host mask> (Removes a G:line for user@host)
Example: GLINE *@*.dal.net 900 :Spammers (Adds a 15 min G:line)


Edit: Fixed minor typo, thnx for the hint Speechles
_________________
NML_375, idling at #eggdrop@IrcNET


Last edited by nml375 on Fri Mar 14, 2008 7:26 am; edited 2 times in total
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Thu Mar 13, 2008 10:34 am    Post subject: Reply with quote

this small script requires you to set authorized users by "chattr <handle> +G"
Code:
set gline_time "1440"
bind pub G !gline pub:gline
proc pub:gline {n u h c t} {
putserv "gline $t $gline_time :Requested by $n ($h)"
}

this works for "!gline <nick>", it sets the gline for 1 day

If you need a script that works in a particular way, you will have to be a lot more specific in your request.
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Thu Mar 13, 2008 10:54 am    Post subject: Reply with quote

this script will use the input style you asked for in first post
!gline <nick> <time> <reason>
and tacks onto the end the handle of the user setting the gline
Code:
bind pub G !gline pub:gline

proc pub:gline {n u h c t} {
set nick "[lindex $t 0]"
set time "[lindex $t 1]"
set reason "[lrange $t 2 end]"
putserv "gline $nick $time :$reason ($h)"
}
Back to top
View user's profile Send private message
CyberWar
Voice


Joined: 04 Feb 2008
Posts: 36

PostPosted: Thu Mar 13, 2008 11:03 am    Post subject: Reply with quote

ok we have a abuse team with opers and users without oline. and we need this bot for the users without olines in our team.

when a user type: .gline <user> <glinetime> <reason>

The bot must gline the user with: gline reason and the current time

e.g.

Quit: user has been temporarily banned from this network: BlaReason 16:00:13 Thursday
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Thu Mar 13, 2008 11:17 am    Post subject: Reply with quote

the ircd will already tell ircops when the g:line is set (unless the ircd is poorly coded)
example:
*** G:Line added for *@x.x.x.x on Sat Feb 9 02:17:23 2008 GMT (from OperServ to expire at Mon Feb 11 02:17:23 2008 GMT: You're using an insecure proxy.)

I just don't see a reason to add the time to the g:line reason.
Back to top
View user's profile Send private message
CyberWar
Voice


Joined: 04 Feb 2008
Posts: 36

PostPosted: Thu Mar 13, 2008 1:06 pm    Post subject: Reply with quote

yep right DragnLord but we must add the time in the reason. Hm ok i think u have right.

Then only .gline nick reason
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Mar 13, 2008 1:15 pm    Post subject: Reply with quote

DragnLord wrote:
...
Code:
bind pub G !gline pub:gline

proc pub:gline {n u h c t} {
set nick "[lindex $t 0]"
set time "[lindex $t 1]"
set reason "[lrange $t 2 end]"
putserv "gline $nick $time :$reason ($h)"
}

Don't use list-commands on strings...
Also, keep in mind that lrange returns a list, not a string - considder joining the result.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
CyberWar
Voice


Joined: 04 Feb 2008
Posts: 36

PostPosted: Thu Mar 13, 2008 1:26 pm    Post subject: Reply with quote

which script is now good? i have here now many ideas Cool
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Mar 13, 2008 1:34 pm    Post subject: Reply with quote

Depends..
Do you want a "channel command", "msg command", or a "dcc partyline command"?

The code in my initial post is proper if you wish for a dcc partyline-based command. For a channel or msg-based command, some minor modifications would have to be made.
DragnLord's first post is flawed as it tries to access a non-existant local variable (intended to access a variable in globalspace), second uses lindex and lrange in an improper manner.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Thu Mar 13, 2008 2:02 pm    Post subject: Reply with quote

Seriously, if you're going to give "non opered" staff access to a gline command and they make the slightest mistake, you could gline the entire network.

You should instead think really hard how smart that is. (NOTE: your non opered staff could gline anyone, including opers)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber