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 

Trying to create a sop/vop/aop/akick list
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
user
 


Joined: 18 Mar 2003
Posts: 1452
Location: Norway

PostPosted: Mon Aug 02, 2004 12:11 am    Post subject: slight error Reply with quote

regarding the ctrl:filter thing... http://forum.egghelp.org/viewtopic.php?t=7115#34956
_________________
Have you ever read "The Manual"?
Back to top
View user's profile Send private message
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Mon Aug 02, 2004 1:30 am    Post subject: Reply with quote

Ah thanks user. You are no doubt a tcl master. I am not good with regexp, regsub complex matching myself! Smile

Though I use, the same ppslim filter, which Alchera posted for almost all of my scripts and it tends to work fine for me. Mr. Green
_________________
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
greenbear
Owner


Joined: 24 Sep 2001
Posts: 733
Location: Norway

PostPosted: Mon Aug 02, 2004 8:26 pm    Post subject: Reply with quote

As a sidenote:
The upcoming eggdrop1.6.17 will have a new tcl command called 'stripcodes'

Quote:
stripcodes <strip-flags> <string>
| Description: strips specified control characters from the string given.
| strip-flags can be any combination of the following:
| b - remove all boldface codes
| c - remove all color codes
| r - remove all reverse video codes
| u - remove all underline codes
| a - remove all ANSI codes
| g - remove all ctrl-g (bell) codes
| Returns: the stripped string.
Back to top
View user's profile Send private message Send e-mail
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Mon Aug 02, 2004 8:52 pm    Post subject: Reply with quote

Well, that's certainly going to simplify things a lot. Mr. Green
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Mon Aug 02, 2004 9:30 pm    Post subject: Reply with quote

Actually there is one currently as well using the same, strip names.
I think its stripcodes or just strip. It only works for stripping codes in DCC (Partyline) with the bot currently, nothing other than that. You can check it by typing .help strip I think or .help all and see its name then do a help search on it. Mr. Green

Hope they add this new function so this can be implemented for channels, and private messages/notices as you mentioned gb. Wink
_________________
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
greenbear
Owner


Joined: 24 Sep 2001
Posts: 733
Location: Norway

PostPosted: Mon Aug 02, 2004 9:32 pm    Post subject: Reply with quote

That's strip, this is a new one called stripcodes.

Quote:
* Added a "stripcodes" Tcl command for efficiantly removing control
codes from strings
Back to top
View user's profile Send private message Send e-mail
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Thu Aug 19, 2004 12:08 am    Post subject: Reply with quote

For WEBCHAT:

Quote:

[03:06] -ChanServ- Listing of #usa AOp:
[03:06] -ChanServ- - atlas (last mask: Eagle@***.d.la, last on: 08/19/04 02:41:25 GMT) added by Asphyxiate:2 on 08/08/04 17:06:36 GMT
[03:06] -ChanServ- - FreshBoy (last mask: ~FrozenHear@***.adsl.ttnet.net.tr, last on: 08/18/04 20:30:06 GMT) added by Asphyxiate:7 on 08/04/04 14:25:26 GMT
[03:06] -ChanServ- End of #usa AOp listing - 2 matches found

ChanServ is service@webchat.org * Channel Services
ChanServ is a Services Agent
ChanServ using webmaster.webchat.org ConferenceRoom Services 2.1.4a-SEC-WEBCHAT
ChanServ encrypt 128
chanserv End of /WHOIS list


For this type of output use this:

Code:

Usage: !chanserv <aop|sop|akick> list


Code:

#Name of the storage file for the access list.
set accesslist "accesslist.txt"

#Full name of channel services.
set chanserv "chanserv"

#################
# BIND commands #
#################
bind pub n "!chanserv" access:list
bind notc - "*Listing of #*" write:list
bind notc - "*(last mask:*" write:list
bind notc - "*End of #*" write:list

proc write:list {nick host hand text {dest ""}} {
  set msg [ctrl:filter $text]
  if {([isbotnick $dest]) && ([string equal $nick "ChanServ"])} {
    set acc_fd [open $::accesslist "a"]
    puts $acc_fd $msg
    close $acc_fd
  }
}

proc access:list {nick uhost hand chan text} {
 set type [string tolower [lindex $text 0]]
  if {[file exists $::accesslist]} {file delete $::accesslist}
   putserv "PRIVMSG $::chanserv :$type $chan list"
  return 0
}


proc ctrl:filter {str} {
  regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $str "" str
  return $str
}


Or you can also try the some binds like:

Code:

bind notc - "*Listing of * *" write:list
bind notc - "*-* *(last mask:* *last on:* *added by* *GMT*" write:list
bind notc - "*End of * * * * * * *" write:list

_________________
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
IRCNick
Halfop


Joined: 12 Oct 2005
Posts: 64
Location: Germany

PostPosted: Thu Dec 22, 2005 10:43 pm    Post subject: Reply with quote

Hmm what should be change for listing a access list that looks like that:


[03:37] -CS- -- Access List for [#demons] --
[03:37] -CS- Num Level Hostmask
[03:37] -CS- --- ----- --------
[03:37] -CS- 1 1000 Nick1 - Added by founder (10000)
[03:37] -CS- 2 1001 Nick2 - Added by founder (10000)
[03:37] -CS- -- End of list --

And instaed of writing into a file... how to get the firs line and split it ...
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Thu Dec 22, 2005 11:27 pm    Post subject: Reply with quote

IRCNick wrote:
Hmm what should be change for listing a access list that looks like that:

hmm wasn't it you that asked about this already somewhere else? and why are you bumping old topics

Quote:

And instaed of writing into a file... how to get the firs line and split it ...

naturally, by using [split], what's the problem?
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
IRCNick
Halfop


Joined: 12 Oct 2005
Posts: 64
Location: Germany

PostPosted: Fri Dec 23, 2005 2:11 pm    Post subject: Reply with quote

You are right... I have asked about this ... and I bumped this topic cause I havent found a solution for my problem... I'm not very "close" with tcl, I learne now from your posts, I'm reading all of the topics, help if nesseccery and if I can.
Back to top
View user's profile Send private message Visit poster's website
Thanhas
Op


Joined: 02 Sep 2006
Posts: 124
Location: Ottawa, Canada

PostPosted: Fri Nov 17, 2006 11:44 am    Post subject: Reply with quote

Why this happpens?

Code:
#Name of the storage file for the access list.
set accesslist "accesslist.txt"

#Full name of channel services.
set chanserv "chanserv"

#################
# BIND commands #
#################
bind pub n "!chanserv" access:list
bind notc - "*Listing of #*" write:list
bind notc - "*(last mask:*" write:list
bind notc - "*End of #*" write:list

proc write:list {nick host hand text {dest ""}} {
set msg [ctrl:filter $text]
if {([isbotnick $dest]) && ([string equal $nick "ChanServ"])} {
set acc_fd [open $::accesslist "a"]
puts $acc_fd $msg
close $acc_fd
}
}

proc access:list {nick uhost hand chan text} {
set type [string tolower [lindex $text 0]]
if {[file exists $::accesslist]} {file delete $::accesslist}
putserv "PRIVMSG $::chanserv :$type $chan list"
return 0
}


proc ctrl:filter {str} {
regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $str "" str
return $str
}



The Errers are ...

Quote:
<HosTer> [20:40] invalid command name "\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\froman\fcharset0 Times New Roman;}{\f1\fswiss\fcharset0 Arial;}}
[08:40:p:17:Nov] <HosTer> {\*\generator Msftedit 5.41.15.1503;}\viewkind4\uc1\pard\sb100\sa100\f0\fs24 #Name of the storage file for the access list. \line set accesslist "accesslist.txt" \line\line #Full name of channel services. \line set chanserv "chanserv" \line\line ################# \line # BIND commands # \line ################# \line bind pub n "!chanserv" access:lis
[08:40:p:17:Nov] <HosTer> [20:40] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)

Let me know the Errer as soon as u can Thanks
Regards
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
user
 


Joined: 18 Mar 2003
Posts: 1452
Location: Norway

PostPosted: Fri Nov 17, 2006 12:04 pm    Post subject: Reply with quote

Thanhas wrote:
Why this happpens?

The parser expects plain text, not rtf.
_________________
Have you ever read "The Manual"?
Back to top
View user's profile Send private message
Thanhas
Op


Joined: 02 Sep 2006
Posts: 124
Location: Ottawa, Canada

PostPosted: Fri Nov 17, 2006 12:10 pm    Post subject: Reply with quote

really not getting u can u Explian a bit?
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Fri Nov 17, 2006 1:50 pm    Post subject: Reply with quote

You can't use word[pad] to save the file.

Use notepad or any other decent text editor.
Back to top
View user's profile Send private message
Thanhas
Op


Joined: 02 Sep 2006
Posts: 124
Location: Ottawa, Canada

PostPosted: Fri Nov 17, 2006 2:01 pm    Post subject: Reply with quote

-ChanServ (service@dal.net)- Error! "/msg ChanServ" is no longer supported. Use "/msg chanserv@services.dal.net" or "/chanserv" instead.


now what? i am on Dalnet
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Goto page Previous  1, 2, 3, 4, 5  Next
Page 4 of 5

 
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